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 <>< [EMAIL PROTECTED]
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html