Re: HOWTO: Get a table or database definition

From: Jeff Boes <jboes(at)qtm(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: HOWTO: Get a table or database definition
Date: 2004-09-07 14:17:07
Message-ID: Dpj%c.23329$cb5.13180@hydra.nntpserver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Google Mike wrote:
> I guess it would be great if Pgsql had a way to find a database
> definition via a system stored procedure like other database platforms
> have.

There are a few:

nexcerpt=# \df pg_get*def
List of functions
Result data type | Schema | Name | Argument data
types
------------------+------------+----------------------+-----------------------
text | pg_catalog | pg_get_constraintdef | oid
text | pg_catalog | pg_get_constraintdef | oid, boolean
text | pg_catalog | pg_get_indexdef | oid
text | pg_catalog | pg_get_indexdef | oid, integer,
boolean
text | pg_catalog | pg_get_ruledef | oid
text | pg_catalog | pg_get_ruledef | oid, boolean
text | pg_catalog | pg_get_triggerdef | oid
text | pg_catalog | pg_get_viewdef | oid
text | pg_catalog | pg_get_viewdef | oid, boolean
text | pg_catalog | pg_get_viewdef | text
text | pg_catalog | pg_get_viewdef | text, boolean
(11 rows)

It looks like 'pg_get_tabledef' isn't one of them, though.

--
(Posted from an account used as a SPAM dump. If you really want to get
in touch with me, dump the 'jboes' and substitute 'mur'.)
________
Jeffery Boes <>< jboes(at)qtm(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-09-07 14:19:39 Re: Salt in encrypted password in pg_shadow
Previous Message Oliver Elphick 2004-09-07 14:15:48 Re: restricting non superuser from accessing other