Re: pg_dumpall's output not totally usable - Mailing list pgsql-bugs

From Tom Lane
Subject Re: pg_dumpall's output not totally usable
Date
Msg-id 7565.959635045@sss.pgh.pa.us
Whole thread Raw
In response to pg_dumpall's output not totally usable  (Olivier Jeannet <jeannet@montrouge.tt.slb.com>)
List 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

pgsql-bugs by date:

Previous
From: Olivier Jeannet
Date:
Subject: pg_dumpall's output not totally usable
Next
From: Zacharie Ambroise
Date:
Subject: ...