Update and bytea problem...

Поиск
Список
Период
Сортировка
От Jerry LeVan
Тема Update and bytea problem...
Дата
Msg-id 2CACB69D-2F74-4A2B-A7EE-7799336F0A4C@eku.edu
обсуждение исходный текст
Ответы Re: Update and bytea problem...
Список pgsql-general
Hi,

I am trying to write a general update command where
there might be "bytea" fields involved.

The update command is generated programatically.

I am having some problems when a bytea field is
involved.

A generated command might look like:

update pics set info='moof.jpg', byteafield='<pgescaped contents of
moof.jpg>'
    where info='doofus.jpg' and byteafield = '<pgescaped contents of
doofus.jpg>'

Unfortunately the above does not seem to work, I keep getting a
syntax error
with an invalid character '\' generally thousands of bytes into the
command.

Does update play nice with bytea used as above ( the escaped contents
of doofus.jpg
are the results of fetching the byteafield as text...)?

For a couple of reasons ( NULL and DEFAULT) I have to use a text
interface.

Thanks

Jerry


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

Предыдущее
От: Stephan Vollmer
Дата:
Сообщение: Re: tsearch2: How to use different configurations for two
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: random delays