On Sat, Oct 08, 2005 at 02:24:00PM -0700, Josh Berkus wrote:
> Sean,
> 
> > I was wonderring, because I create a lot of server side utility functions,
> > whether adding an option to pg_dump to just dump functions has been
> > considered. I did a quick perusal of the code, and noted that there is a
> > separate section within pg_dump to get the functions, but it is not able to
> > be triggered separately from schema and data. Any reason why this wouldn't
> > be a good(tm) idea?
> 
> It would be an *excellent* idea, along with options to dump specific 
> functions, and both specific and all views/types/operators.  Go for it.

Agreed. IMHO this should actually tie in with the discussion on -general
right now about better ways to specify includes and excludes. ISTM that
pg_dump should allow you to feed it a file that specifies what you do
and don't want dumped. That can be extended to include object type. One
possibile file format, off the top of my head:

<action>    <objects>   <filter>    <options>

<action>
Roughly, dump or ignore.  Can be object-dependant. For example, tables
could have these actions:
dump-ddl    dumps DDL only for tables matching <filter>
dump-data   dumps data only for tables matching <filter>
dump-all    dumps DDL and data for tables matching <filter>
ignore      ignores tables matching <filter>

<objects>
List of object types, or * for any object. IE: tables,views,indexes

<filter>
Regex of what this rule applies to

<options>
Would be useful to allow specifying if dependancies should be dumped.
Maybe some other things as well.
-- 
Jim C. Nasby, Sr. Engineering Consultant      [EMAIL PROTECTED]
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to