Re: postgresql-9.1.1 PQescapeByteaConn() generating incorrectly quoted output.
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: postgresql-9.1.1 PQescapeByteaConn() generating incorrectly quoted output. |
| Дата | |
| Msg-id | 4589.1320258060@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | postgresql-9.1.1 PQescapeByteaConn() generating incorrectly quoted output. (Graham Murray <gmurray@webwayone.co.uk>) |
| Ответы |
Re: postgresql-9.1.1 PQescapeByteaConn() generating
incorrectly quoted output.
|
| Список | pgsql-general |
Graham Murray <gmurray@webwayone.co.uk> writes:
> Since upgrading test systems to postgresql 9.1, I am seeing some inserts
> to bytea fields giving errors such as "ERROR: invalid byte sequence for
> encoding "UTF8": 0xf9" Where the insert is from a C program using libpq
> and is of the form "insert into xxx values(E'%s')" where the value is
> the return of PQescapeByteaConn();
That is incorrect coding. The result of PQescapeByteaConn has never
been meant to be put into an E'' literal. You might have managed to
get away with it so long as standard_conforming_strings was off in the
server, but it's on by default in 9.1.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера