Re: Backup/Restore bytea data

From: Richard Huxton <dev(at)archonet(dot)com>
To: sub3 <steve(at)subwest(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Backup/Restore bytea data
Date: 2013-01-14 08:53:22
Message-ID: 50F3C782.80800@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 14/01/13 01:13, sub3 wrote:
> Hi,
> I am having an issue upgrading a really old 8.2 db up to 9.2.2. One of the
> tables contains a bytea field. When I backup& restore using pgadmin from
> my 9.2.2 install, it doesn't convert this field correctly.

Could this be due to your bytea_output setting?
http://www.postgresql.org/docs/9.2/static/datatype-binary.html

Not sure how this could snag you if you are dumping using 9.2, but this:

> I see it starts w/special character when selecting it from the old database;
> in the new db, I see a string starting w/"\211PNG".

is clearly in "escape" rather than "hex" format.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Condor 2013-01-14 09:22:59 Re: Problem with records that disappear.
Previous Message Vlad Arkhipov 2013-01-14 08:53:08 Re: Problem with records that disappear.