Re: Dumping functions with pg_dump - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Dumping functions with pg_dump
Date
Msg-id 201104051915.30985.adrian.klaver@gmail.com
Whole thread Raw
In response to Re: Dumping functions with pg_dump  (Greg Corradini <gregcorradini@gmail.com>)
List pgsql-general
On Tuesday, April 05, 2011 5:24:13 pm Greg Corradini wrote:
> On Tue, Apr 5, 2011 at 4:30 PM, Adrian Klaver <adrian.klaver@gmail.com>wrote:

>
> Thx for the replies Adrian and Jerry,
>
> Those are both options. Jerry, your suggestion is the work around I've
> already used. Adrian, I did not know you could do that. Still...I was
> looking for something that worked inline with pg_dump...and it looks like
> pg_restore is still the major game in town.

Yea, the other common method is to develop from the outside in, instead of
inside out. To explain, outside in would be to keep the schema object creation
scripts in files external to the database and feed them to the database as
needed. Initial object creation and  revisions are done on the external files.
Inside out would be what you are doing, pulling the schema files from inside the
database. One is not necessarily better than the other, just each has its
strengths and weaknesses, as you are finding:)

>
> It would be nice if pg_dump got some option flags to do this sort of thing
> (though I'm naive on why this doesn't exist in the first place)

pg_dump/pg_restore has become more flexible over the years, but there are still
dependency issues between schema objects that make what you want difficult.  The
dependency tracking really only fully works for a complete dump/restore.

--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Greg Corradini
Date:
Subject: Re: Dumping functions with pg_dump
Next
From: Jeremy Palmer
Date:
Subject: Re: Out of memory