System catalog future changes

From: Steve Midgley <public(at)misuse(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: System catalog future changes
Date: 2007-12-18 16:53:15
Message-ID: 20071218165836.4EFD42E004C@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello again,

Reading a previous recent post and answers called "Describe Table" got
me thinking about a little piece of SQL I use in an application to get
a list of all the tables for a specific namespace:

select pg_class.relname as table_name
from pg_class
join pg_namespace on pg_namespace.oid = relnamespace
where pg_class.relkind = 'r' and pg_namespace.nspname = 'public'
order by pg_class.relname

I have assumed that this sort of query would be relatively "durable" -
that future system catalog changes are unlikely to make this query stop
working? Does anyone have any knowledge of how "fixed" the columns and
values of this query are (i.e. are there a lot of internal and external
dependencies that make future Pg versiosn unlikely to break the above
code)?

Any other input on the above SQL - should I be doing this in another
way?

Thanks for any thoughts or advice,

Steve

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Pavel Stehule 2007-12-18 17:36:36 Re: System catalog future changes
Previous Message danap 2007-12-18 01:21:10 Re: Describe Table