Ordering of pg_dump output - Mailing list pgsql-hackers

From Tom Lane
Subject Ordering of pg_dump output
Date
Msg-id 2013.950026486@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] network_ops in 7.0 and pg_dump question  (Oleg Bartunov <oleg@sai.msu.su>)
Responses Re: [HACKERS] Ordering of pg_dump output
Re: [HACKERS] Ordering of pg_dump output
Re: [HACKERS] Ordering of pg_dump output
List pgsql-hackers
Oleg Bartunov <oleg@sai.msu.su> writes:
> creation of index works now. But what about pg_dump ?
> I still have to edit manually dump file.
> look to excerption from dump file:
> CREATE TABLE "applicant" (
>         "candx" int2 DEFAULT next_applicant() NOT NULL,
>         "candidate" text,
>         "candt" int2,
>         "img" text
> );
> This fails because function next_applicant dumps later !

Yeah, it's a known bug.  We can't just dump the functions first,
though, can we?  I'm not sure how carefully function definitions
get examined by CREATE FUNCTION.

The simplest real solution I've heard so far is to dump database objects
in order by OID rather than doing it strictly by type.

Is anyone working on this, or does anyone want to?  I haven't looked at
pg_dump in a while, but I know some other folks have been hacking it
recently.
        regards, tom lane


pgsql-hackers by date:

Previous
From: wieck@debis.com (Jan Wieck)
Date:
Subject: Deferred trigger queue
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] docs and createlang patch for plperl