Thanks Erik - that cleans things up significantly for me.
For the record, the SQL for finding all the table
names (alpha ordered) in the public schema using pg_tables view is:
select tablename from pg_tables where
schemaname='public' order by tablename
Steve
At 09:38 AM 12/18/2007, Erik Jo
On Dec 18, 2007, at 10:53 AM, Steve Midgley wrote:
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
Hello
use information schema instead:
SELECT * FROM information_schema.tables;
SELECT * FROM information_schema.columns ;
Structure of these tables is specified in ANSI SQL. But nobody can be
sure so all these table are stable forever. System catalog isn't fixed
and can be changed every may
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.