Encoding bytea

Поиск
Список
Период
Сортировка
От Achilleus Mantzios
Тема Encoding bytea
Дата
Msg-id Pine.LNX.4.44.0403031457110.2444-100000@matrix.gatewaynet.com
обсуждение исходный текст
Ответ на Re: updating remote database  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
Ответы Re: Encoding bytea  (Joe Conway <mail@joeconway.com>)
Список pgsql-sql
Hi,
is there a way to encode a bytea in such a way that the resulting
text stream be readily available (\\ escaped for unprintable chars) for 
usage in an insert statement?

None of base64,hex,escape options in encode() seem to produce
anything close.

This is meant to be used with generating insert statements in xml files
for remote processing.

I can always (in java) ResultSet.getString(bytea_col_idx), 
get the result (ala psql) with one "\" trimmed out,
and process the output (by adding an extra "\" where needed) from there, 
but i am not sure if the jdbc driver will be allowing this ... convinience
in the future.

Thanx.

-- 
-Achilleus



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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: oracle decode()
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Encoding bytea