[apologies -- this amounts to a cross-post on subject "DB with bytea
types reload problem" -- I'm fairly desperate!]
Hi Jonathan
I saved a db with some bytea columns to text using
pg_dump -a -d <db> > out.sql
If I go
psql: \i out.sql
multiple errors result, such as:
psql:out.sql:505: invalid command \N
psql:out.sql:505: invalid command \
The sql dump file has lines starting something like this for the photo table:
1 500 375 h
\\377\\330\\377\\340\\000\\020JFIF\\000\\001\\001\\001\\000H\\000H\\000\\000\\377\\341\\023>Exif\\000\\000MM\\000*\\000\\000\\000\\010\\000\\012\\00....
Is there any way I can retrieve the image data?
Rory
On 10/09/03, Jonathan Bartlett (johnnyb@eskimo.com) wrote:
> > > What is the size limit of bytea, I thought it was 8K?
>
> No limit that I've found. Some are several meg.
>
> > > How do you dump your database when you have bytea, do you need to do a
> > > binary dump?
>
> Nope. pg_dump automagically escapes everything.
--
Rory Campbell-Lange
<rory@campbell-lange.net>
<www.campbell-lange.net>