Re: [SQL] backup and document views and user functions

2010-08-30 Thread Pavel Stehule
hello 2010/8/30 Peter Steinheuser : > You'll probably have to write something (a function) that pulls the data out > of pg_catalog. > You can get a leg up on that by connecting to psql using -E, which echoes > hidden queries. > If you do a \df+   on a function, you'll see the query PG uses. > the

Re: [SQL] backup and document views and user functions

2010-08-30 Thread Peter Steinheuser
You'll probably have to write something (a function) that pulls the data out of pg_catalog. You can get a leg up on that by connecting to psql using -E, which echoes hidden queries. If you do a \df+ on a function, you'll see the query PG uses. ex. production=# \df+ myschema.* * QUERY **

Re: [SQL] backup and document views and user functions

2010-08-30 Thread Reinoud van Leeuwen
On Mon, Aug 30, 2010 at 09:21:06PM +0300, David Harel wrote: > Hi, > > I am looking for an easy way to backup views and functions. I want to > store them in our version control system. > > Using pgAdmin I can access them one at a time. I am looking for a better > reporting mechanism. psql shell

Re: [SQL] backup and document views and user functions

2010-08-30 Thread Hélder M . Vieira
Hi. I am looking for an easy way to backup views and functions. I want to store them in our version control system. Well... As far as I can see, for functions you should go to the 'pg_catalog' schema, table 'pg_proc'. In column 'prosrc' you will find the original text, but other attributes a

Re: [SQL] backup and document views and user functions

2010-08-30 Thread Pavel Stehule
Hello 2010/8/30 David Harel : > Hi, > > I am looking for an easy way to backup views and functions. I want to store > them in our version control system. > move your functions and view to separate schema - and do backup with pg_dump -n schema regards Pavel Stehule > Using pgAdmin I can access

[SQL] backup and document views and user functions

2010-08-30 Thread David Harel
Hi, I am looking for an easy way to backup views and functions. I want to store them in our version control system. Using pgAdmin I can access them one at a time. I am looking for a better reporting mechanism. psql shell command for such report will be just fine. Sorry for the lame question