The following bug has been logged online:
Bug reference: 1089
Logged by: Joseph Tate
Email address: jtate(at)mi-corporation(dot)com
PostgreSQL version: 7.4
Operating system: Win32/Cygwin
Description: pg_restore fails when restoring lo.sql functions from
I've been having no end to problems with pg_dump/pg_restore. This stuff
should just work!
Execute the following as a user with createdb privs.
$ createdb test-lo
$ psql -f $CONTRIB/lo.sql -d test-lo
$ pg_dump --format=c --file=/tmp/test-lo.bak test-lo
$ dropdb test-lo
$ pg_restore -vCd template1 /tmp/test-lo.bak
pg_restore: connecting to database for restore
pg_restore: creating DATABASE test-lo
pg_restore: connecting to new database "test-lo" as user "postgres"
pg_restore: connecting to database "test-lo" as user "postgres"
pg_restore: creating ACL public
pg_restore: creating FUNCTION lo_in(cstring)
pg_restore: NOTICE: type "lo" is not yet defined
DETAIL: Creating a shell type definition.
pg_restore: creating FUNCTION lo_out(lo)
pg_restore: NOTICE: argument type lo is only a shell
pg_restore: creating TYPE lo
pg_restore: creating FUNCTION lo_oid(lo)
pg_restore: creating FUNCTION oid(lo)
pg_restore: creating CAST CAST (public.lo AS oid)
pg_restore: creating FUNCTION lo(oid)
pg_restore: creating CAST CAST (oid AS public.lo)
pg_restore: [archiver (db)] could not execute query: ERROR: function
lo(oid) does not exist
pg_restore: *** aborted because of error
To me it looks like the function is created two lines above the failure.
This works fine on Linux using 7.3.4. It also worked on 7.2.x on Cygwin.
pgsql-bugs by date
|Next:||From: Jeff Bohmer||Date: 2004-03-02 20:48:12|
|Subject: Re: backend crash with certain statements/tables|
|Previous:||From: Tom Lane||Date: 2004-03-02 18:57:09|
|Subject: Re: backend crash with certain statements/tables |