Skip site navigation (1) Skip section navigation (2)

Re: Invalid UTF8 & Large Objects

From: Prasanth <dbadmin(at)nqadmin(dot)com>
To: John DeSoi <desoi(at)pgedit(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Invalid UTF8 & Large Objects
Date: 2006-04-26 15:01:18
Message-ID: 444F8B3E.8070706@nqadmin.com (view raw or flat)
Thread:
Lists: pgsql-admin
I did the following and it worked.

1. Did a text pg_dump and used iconv to remove invalid characters and then
loaded this into the database.
2. Took a dump created using -Fc and restored just the pg_largeobject table.

Every thing seems to be good.

I don't see the -b option in pg_dump in 8.1.3 so am I right in saying that large
objects are automatically added to the dump?

Thanks,
-Prasanth.

John DeSoi wrote:
> 
> On Apr 25, 2006, at 4:17 PM, Prasanth wrote:
> 
>> But then my problem is I have to do a text dump to use iconv in which
>> case I will loose the large objects.
>> I tried using the iconv on the dump generated using the -Fc option and
>> then when I try to restore that  I am getting the following error
>> pg_restore: [archiver] entry ID 0 out of range -- perhaps a corrupt TOC
> 
> -Fc produces a binary format, so you can't use iconv on it. One option
> might be to write a script to export your large objects, dump text only
> and fix with iconv, then reload the database and import the large objects.
> 
> 
> 
> John DeSoi, Ph.D.
> http://pgedit.com/
> Power Tools for PostgreSQL
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

In response to

pgsql-admin by date

Next:From: Doug LochartDate: 2006-04-26 15:44:41
Subject: Socket Timeouts and fatal errors (please help)
Previous:From: John DeSoiDate: 2006-04-26 13:40:59
Subject: Re: Problem with Large objects of .gif&.asp

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group