BUG #1089: pg_restore fails when restoring lo.sql functions from contrib

Поиск
Список
Период
Сортировка
От PostgreSQL Bugs List
Тема BUG #1089: pg_restore fails when restoring lo.sql functions from contrib
Дата
Msg-id 20040302201950.767B4CF4C89@www.postgresql.com
обсуждение исходный текст
Ответы Re: BUG #1089: pg_restore fails when restoring lo.sql functions  (Neil Conway <neilc@samurai.com>)
Re: BUG #1089: pg_restore fails when restoring lo.sql functions from contrib  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      1089
Logged by:          Joseph Tate

Email address:      jtate@mi-corporation.com

PostgreSQL version: 7.4

Operating system:   Win32/Cygwin

Description:        pg_restore fails when restoring lo.sql functions from
contrib

Details:

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

This returns
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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: backend crash with certain statements/tables
Следующее
От: Jeff Bohmer
Дата:
Сообщение: Re: backend crash with certain statements/tables