Re: Extracting object source code from database to store in CVS...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adrianna Pinska <adrianna(dot)pinska(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Extracting object source code from database to store in CVS...
Date: 2005-03-23 17:04:22
Message-ID: 7763.1111597462@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrianna Pinska <adrianna(dot)pinska(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-03-23 17:11:17 Re: I'm OWNER of the db but I get `permission denied` when
Previous Message Greg Patnude 2005-03-23 17:03:57 Re: Table audit system