On Mon, May 12, 2008 at 10:57 AM, Reece Hart [EMAIL PROTECTED] wrote:
On Sun, 2008-05-11 at 06:12 -0700, Postgres User wrote:
Has anyone written a function that scripts out all the functions in a
database as full SQL statements (Create Function.)
You could pg_dump the schema in the
Has anyone written a function that scripts out all the functions in a
database as full SQL statements (Create Function.)
I found the below SQL will return all the fields needed to build a SQL
statement, but it would take some work to combine the field values
correctly to get the right format.
On Sun, May 11, 2008 at 06:12:40AM -0700, Postgres User wrote:
Has anyone written a function that scripts out all the functions in a
database as full SQL statements (Create Function.)
I found the below SQL will return all the fields needed to build a SQL
statement, but it would take some
Unfortunately I didn't see a way to tell pg_dump to dump only objects
of a specific type, like functions or sequences. It requires
additional coding to parse the output and that's less than ideal...
Does pg_dump not do what you want?
On Sun, May 11, 2008 at 6:49 AM, Martijn van Oosterhout
On Sun, May 11, 2008 at 11:28:37AM -0700, Postgres User wrote:
Unfortunately I didn't see a way to tell pg_dump to dump only objects
of a specific type, like functions or sequences. It requires
additional coding to parse the output and that's less than ideal...
hmmm .. additional coding seems
Yes, but I'm doing this from a Delphi program in Windows and that's
why I'm looking for a solution that's SQL-based.
It would be nice if one of the system catalog views handled it.
hmmm .. additional coding seems a bit too much for a simple thing like
this:
pg_dump -s | perl -ne 'print if
On Sun, 2008-05-11 at 06:12 -0700, Postgres User wrote:
Has anyone written a function that scripts out all the functions in a
database as full SQL statements (Create Function.)
You could pg_dump the schema in the custom format (-Fc), then call
pg_restore with -l to get the TOC, grep the TOC