Re: List of tables

Поиск
Список
Период
Сортировка
От George Weaver
Тема Re: List of tables
Дата
Msg-id 00b801c3e5bc$79d39e70$6400a8c0@Dell4500
обсуждение исходный текст
Ответ на List of tables  ("Marcel Wolf" <mwolfs@comcast.net>)
Список pgsql-novice
Hi Marcel,
 
Assuming you want just the tables you've created (and not a listing of system tables), you can use the following:
 
SELECT relname FROM pg_class  WHERE relkind='r' AND relfilenode > (SELECT datlastsysoid FROM pg_database WHERE datname = 'template0') ORDER BY relname;
 
Regards,
George
----- Original Message -----
Sent: Wednesday, January 28, 2004 10:04 AM
Subject: [NOVICE] List of tables

Guys & Gals

What is the best way to get a list of tables in a database? Is there a syntax for getting from the database after I connect or do I have to query the System Catalog? Either way what would be the syntax? (Note : Using PHP )

 

Thanks Again

 

Marcel Wolf

В списке pgsql-novice по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: pl/pgsql Function Problem
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: db security; user identification