Re: Show tables!

Поиск
Список
Период
Сортировка
От Lamar Owen
Тема Re: Show tables!
Дата
Msg-id 395385D6.F64DB16D@wgcr.org
обсуждение исходный текст
Ответ на Show tables!  ("Luiz Antonio" <luiz@supersoft.com.br>)
Список pgsql-general
Luiz Antonio wrote:
>
> Hi people!!!
> Does anybody know how I can execute a comand as the comand show tables that
> exist in teh MySQL database?
> Does exist some comand that show all tables of a database???
> If somebody can help me...thanks!!!

\dt in psql.

The SQL to do this:
SELECT relname FROM pg_class WHERE relkind='r';

This will give you all tables in the system, including system catalogs.
If you don't want system catalogs, pgaccess stuff, and pgadmin stuff,
then:

SELECT relname FROM pg_class
    WHERE relkind='r'
    and relname !~ '^pg_'
    and relname !~ '^pga_'
    and relname !~ '^pgadmin_';

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

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

Предыдущее
От: NRonayette
Дата:
Сообщение: Re: Show tables!
Следующее
От: Tom Lane
Дата:
Сообщение: Re: followup to SELECT/INSERT problem