Patch for pg_dump

Started by Dany DeBontridderover 18 years ago2 messages
#1Dany DeBontridder
dany118@gmail.com
1 attachment(s)

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)

Attachments:

patch-pg_dump.8.2.3.gzapplication/x-gzip; name=patch-pg_dump.8.2.3.gzDownload
#2Bruce Momjian
bruce@momjian.us
In reply to: Dany DeBontridder (#1)
Re: Patch for pg_dump

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@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

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