Patch for pg_dump

Lists: pgsql-hackers
From: "Dany DeBontridder" <dany118(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Patch for pg_dump
Date: 2007-05-03 15:39:04
Message-ID: c40e6c010705030839l3aa1ca31xdd855fc6e186ee78@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I often need in command line to get the code of function, so I make a patch
for pg_dump, thanks this patch pg_dump is able to dump only one functions or
all the functions.

The argument is --object or -B

Example:
./pg_dump -Bfunction:test_it -Bfunction:dblink_open
To dump the functions test_it, dblink_open
./pgdump --object=function or pg_dump -Bfunction to dump only the functions

It is possible to add other objects, (see getObject functions)

I hope you'll find it interesting.

Regards,

.D.

(patch under BSD licence)

Attachment Content-Type Size
patch-pg_dump.8.2.3.gz application/x-gzip 4.0 KB

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Dany DeBontridder <dany118(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch for pg_dump
Date: 2007-05-16 15:10:54
Message-ID: 200705161510.l4GFAsZ02499@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


This has been saved for the 8.4 release:

http://momjian.postgresql.org/cgi-bin/pgpatches_hold

---------------------------------------------------------------------------

Dany DeBontridder wrote:
> I often need in command line to get the code of function, so I make a patch
> for pg_dump, thanks this patch pg_dump is able to dump only one functions or
> all the functions.
>
> The argument is --object or -B
>
> Example:
> ./pg_dump -Bfunction:test_it -Bfunction:dblink_open
> To dump the functions test_it, dblink_open
> ./pgdump --object=function or pg_dump -Bfunction to dump only the functions
>
>
> It is possible to add other objects, (see getObject functions)
>
>
> I hope you'll find it interesting.
>
> Regards,
>
> .D.
>
> (patch under BSD licence)

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +