pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feeddump contents & missing functions
2+ messages / 2 participants
[nested] [flat]
* dump contents & missing functions
@ 2003-12-31 16:09 Kris Kiger <kris@musicrebellion.com>
0 siblings, 1 reply; 2+ messages in thread
From: Kris Kiger @ 2003-12-31 16:09 UTC (permalink / raw)
To: pgsql-admin
Is it possible to make a schema change to a dumped backup? I've
un-tarred the file and edited toc.dat and restore.sql, but when I
attempt to pg_restore the re-tarred file, I get an archiver out of
memory error.
This whole issue arose when I set a default in a table row equal to a
value that a plpgsql function returns (ie the table default =
functionname(variable)). However, after exploration of the dump files,
it appears that pg_restore tries to restore the tables before it
restores functions...hence I get an error upon restore of the original
dump, because the function does not yet exist. Does anyone know if the
ordering of the restore is in fact the problem? Any input is appreciated!
Kris
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: dump contents & missing functions
@ 2003-12-31 16:56 Tom Lane <tgl@sss.pgh.pa.us>
parent: Kris Kiger <kris@musicrebellion.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2003-12-31 16:56 UTC (permalink / raw)
To: Kris Kiger <kris@musicrebellion.com>; +Cc: pgsql-admin
Kris Kiger <kris@musicrebellion.com> writes:
> This whole issue arose when I set a default in a table row equal to a
> value that a plpgsql function returns (ie the table default =
> functionname(variable)). However, after exploration of the dump files,
> it appears that pg_restore tries to restore the tables before it
> restores functions...hence I get an error upon restore of the original
> dump, because the function does not yet exist. Does anyone know if the
> ordering of the restore is in fact the problem? Any input is appreciated!
pg_restore has facilities for telling it to restore the dump contents in
a particular order (basically, get a table-of-contents listing and then
edit the listing). I don't think it works to hack the tar file
directly.
Also you could try using development tip pg_dump, which should get the
dump order right to begin with. AFAIK it will work okay with a 7.4
server.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-12-31 16:56 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-12-31 16:09 dump contents & missing functions Kris Kiger <kris@musicrebellion.com>
2003-12-31 16:56 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox