[fanlijing wants to write bytea to file]
> A simple
> COPY (SELECT byteacol WROM mytab WHERE ...) TO 'filename' (FORMAT
> should do the trick.
a) "binary" must be surrounded by single quotes.
b) that won't dump just the binary data - you would have
to remove the first 25 bytes and the last 2 bytes...
So maybe using the functions I mentioned would be the
best way after all.
You could also write your own user defined function in C.
In response to
pgsql-admin by date
|Next:||From: Merlin Moncure||Date: 2011-10-10 15:51:14|
|Subject: Re: [GENERAL] how to save a bytea value into a file?|
|Previous:||From: jesper||Date: 2011-10-10 14:17:05|
pgsql-general by date
|Next:||From: hubert depesz lubaczewski||Date: 2011-10-10 14:48:07|
|Subject: Re: a dumb question regarding RULES|
|Previous:||From: Rafal Pietrak||Date: 2011-10-10 14:06:34|
|Subject: a dumb question regarding RULES|