Re: pg_dumpall's output not totally usable
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: ojeannet@slb.com
Cc: pgsql <pgsql-bugs@postgresql.org>
Date: 2000-05-29T21:17:25Z
Lists: pgsql-bugs
Olivier Jeannet <jeannet@montrouge.tt.slb.com> writes: > The problem is that the output of pg_dumpall doesn't totally work, and I > found that some statements are not in the proper order. So I edited the > output, made some cuts and pastes, and was able to successfully restore the > database. The few statements I had to put earlier in the output file are > "CREATE FUNCTION" statements, like : > CREATE FUNCTION "countadm_moduletable" (int4 ) RETURNS int4 AS 'SELECT > count(*) FROM ADM_MODULETABLE WHERE MODULETABLEID = $1' LANGUAGE 'SQL'; > Does anyone know about this problem ? Yeah, it's a known problem... pg_dump is pretty stupid about the order it dumps stuff in. There's been talk of analyzing the dependencies among all items in the database, but that looks *hard*. A 99% solution is to dump things in order by OID, and that's what we'll probably do sometime soon. regards, tom lane