Re: BUG #9776: well formed json with embedd colon ':' causes error on copy

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #9776: well formed json with embedd colon ':' causes error on copy
Дата
Msg-id 16086.1396278426@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #9776: well formed json with embedd colon ':' causes error on copy  (larry.price@enterprisedb.com)
Список pgsql-bugs
larry.price@enterprisedb.com writes:
> [ backslashes disappearing from an input value ]

> it seems to be stripping the escape sequences before the json is parsed.
> Could be user error. But it appears that strings are not getting escaped
> properly before being parsed as json, but only when the copy statement is
> used. Other json from the same set gets properly inserted.

"User error" sounds about right to me.  What is producing the file you are
feeding to \copy, and is it familiar with the quoting rules for COPY
input?  In particular, the need for backslashes to be doubled?
See File Formats / Text Format, about halfway down this page:
http://www.postgresql.org/docs/9.3/static/sql-copy.html

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: ::date cast error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #9793: to_number wrong convertion