Re: bytea and character encoding when inserting escaped literals

Поиск
Список
Период
Сортировка
От Asche
Тема Re: bytea and character encoding when inserting escaped literals
Дата
Msg-id 208D01DB-7F10-454B-BB71-41321ABCF95F@mac.com
обсуждение исходный текст
Ответ на Re: bytea and character encoding when inserting escaped literals  (Lee Feigenbaum <lee@thefigtrees.net>)
Ответы Re: bytea and character encoding when inserting escaped literals
Список pgsql-general
Hi Lee,

> Thanks for the suggestion. I should have mentioned in my original
> message that as per your suggestion and the suggestion in the
> documentation, I have tried escaping the backslashes. When I do
> this, I get the error:
>
>  ERROR: invalid input syntax for type bytea
>
> I tried also doing
>
>  INSERT INTO myTable VALUES (..., E'\\x15\\x1C\\x2F\\x00\
> \x02...'::bytea, ...) ;
>
> but get the same errors.

I think i see another problem with your query. You should convert to
three-digit octal (something like \\001\\002...) not \\x01 (hex?).

Jan

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

Предыдущее
От: Lee Feigenbaum
Дата:
Сообщение: Re: bytea and character encoding when inserting escaped literals
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: operator varchar = integer