pg_catalog forward compatibility

Started by Bob Gobeilleover 17 years ago3 messagesgeneral
Jump to latest
#1Bob Gobeille
bob.gobeille@hp.com

Is there a better way to query a database definition than select from
pg_catalog tables and views? For example, when I put out a new
software update, I need to verify that all the table, column,
constraint, etc definitions are correct for the update.

Thanks,
Bob

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Bob Gobeille (#1)
Re: pg_catalog forward compatibility

Hello

2008/9/2 Robert Gobeille <bob.gobeille@hp.com>:

Is there a better way to query a database definition than select from
pg_catalog tables and views? For example, when I put out a new software
update, I need to verify that all the table, column, constraint, etc
definitions are correct for the update.

information_schema

http://www.postgresql.org/docs/8.3/interactive/information-schema.html

Regards
Pavel Stehule

Show quoted text

Thanks,
Bob

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3David Fetter
david@fetter.org
In reply to: Bob Gobeille (#1)
Re: pg_catalog forward compatibility

On Tue, Sep 02, 2008 at 09:25:50AM -0600, Robert Gobeille wrote:

Is there a better way to query a database definition than select
from pg_catalog tables and views? For example, when I put out a
new software update, I need to verify that all the table, column,
constraint, etc definitions are correct for the update.

The catalogs don't have enough information for that. Instead, keep
better control of your DDL by putting it under source code management
including any upgrade (or possibly downgrade) scripts in it.

If you're deploying an application, be sure you warn people that any
DDL they do that's not one of your scripts will break it. Explicitly
disclaim any responsibility for such meddling. :)

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate