Re: Problem inserting binary data in bytea column of UTF-8 database

Поиск
Список
Период
Сортировка
От Brice André
Тема Re: Problem inserting binary data in bytea column of UTF-8 database
Дата
Msg-id CAOBG12mzfRYpec_KSginj5H-z=QTDj0U0m9N3nPp7kp-KjN9cg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Problem inserting binary data in bytea column of UTF-8 database  (Alexey Bashtanov <bashtanov@imap.cc>)
Список pgsql-sql
Hello Alexey,

You are right!

Double quote disapeared in my C++ program (because not properly escaped) and I performed copy paste of C++ generated SQL query for further tests without realising that there was a missing backslash.

Thanks for your help,
Brice


2018-07-05 15:48 GMT+02:00 Alexey Bashtanov <bashtanov@imap.cc>:
Hi Brice,

On 03/07/18 05:28, Brice André wrote:
insert into test (test) values (E'\xC744'::bytea);

I think double backslash needs to be used.
See https://www.postgresql.org/docs/current/static/datatype-binary.html#id-1.5.7.12.9

Best,
  Alex

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Problem inserting binary data in bytea column of UTF-8 database
Следующее
От: komala pelleti
Дата:
Сообщение: Vacumdb Command Problem