Re: [BUGS] Bug #533: BLOB (lo type) objects could not be restored - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: [BUGS] Bug #533: BLOB (lo type) objects could not be restored
Date
Msg-id 3C146691.32F2C4FE@tpf.co.jp
Whole thread Raw
List pgsql-hackers
pgsql-bugs@postgresql.org wrote:
> 
> Stefan Hadjistoytchev (sth@hq.bsbg.net) reports a bug with a severity of 1
> The lower the number the more severe it is.
> 
> Short Description
> BLOB (lo type) objects could not be restored
> 
> Long Description
> Hi :)
> 
> Problem appeared in POSTGRESQL 7.2b3 CVS distribution
> 
> After creating a table containing BLOB (lo type) column and filling it in an error occured restoring this table using
"pg_restore":
> 
> ERROR:  Unable to identify an operator '=' for types 'oid' and 'lo'
>         You will have to retype this query using an explicit cast

pg_restore in 7.2 could handle the type lo defined in
contrib/lo but couldn't handle the type lo you created by CREATE TYPE lo (   internallength=4,  externallength=10,
input=int4in,output=int4out,   default='',  passedbyvalue );
 
The type is incomplete and hard to handle in pg_restore.

> Using Postgres 7.1.3 - there is no such error :(,

pg_restore in 7.1.x couldn't restore large objects
of type lo properly though it doesn't cause any error.

One way I can think of is to create the type lo in
contrib/lo in advance of pg_restore and ignore 
the 'create type lo ..' commands in pg_restore but
it seems pretty unnatural for pg_restore.

Comments ?

I've worried about the use of type lo which has
been used only(?) in ODBC. It doesn't seem wrong
because PostgreSQL hasn't provided the proper
BLOB type. However I'm not sure now how to handle
large objects in ODBC in future.

Comments ?

regards,
Hiroshi Inoue


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Minor updates for date/time committed
Next
From: Christof Petig
Date:
Subject: Re: pg_dump: Sorted output, referential integrity