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


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to