Re: Extracting object source code from database to store in CVS... - Mailing list pgsql-general

From Tom Lane
Subject Re: Extracting object source code from database to store in CVS...
Date
Msg-id 7763.1111597462@sss.pgh.pa.us
Whole thread Raw
In response to Extracting object source code from database to store in CVS...  (Adrianna Pinska <adrianna.pinska@gmail.com>)
List pgsql-general
Adrianna Pinska <adrianna.pinska@gmail.com> writes:
> More specifically, I've been looking for a way to persuade postgresql
> to output the create script for a single object - without much
> success.  It seems that pg_dump can output a dump of the entire
> database schema or a dump of a single table, but not of a different
> kind of object like a function or view.

The fact that pg_dump has restrictive switches for selecting tables but
not other kinds of objects isn't fundamental; it's just that no one has
gotten around to it.  Perhaps your best approach in the long term is to
implement such switches.  If you can do that and get it accepted into
the code base, then you won't have to worry about keeping your code
up-to-date with future system catalog changes.

Based on past history, I'd say that trying to maintain your own pg_dump
subset is a losing proposition.  We whack the catalogs around a lot ...

            regards, tom lane

pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: Delay INSERT
Next
From: Richard Huxton
Date:
Subject: Re: I'm OWNER of the db but I get `permission denied` when