Re: Any way to SELECT a list of table names?

Поиск
Список
Период
Сортировка
От Chris Travers
Тема Re: Any way to SELECT a list of table names?
Дата
Msg-id 015b01c3d9b1$42e7c470$54285e3d@winxp
обсуждение исходный текст
Ответ на Re: Any way to SELECT a list of table names?  ("scott.marlowe" <scott.marlowe@ihs.com>)
Список pgsql-general
From: "Ken Godee" <ken@perfect-image.com>
> Not sure if this is what you're trying to do but.......
>
> "SELECT tablename FROM pg_tables where tablename not like 'pg_%'"
>
> Will get a list of tables in the db you're connected to.
>
You can do that, but if by any chance, the pg_catalog schema changes, you
may find your app broken.  The pg_catalog schema is not really intended to
be a client interface, so if you go that way, you may want to wrap it in a
function :-)

Now, if you are using PostgreSQL 7.4, use this query instead:

select table_name, table_schema from information_schema.tables where
table_schema NOT IN ('pg_catalog', 'information_schema');

Best wishes,
Chris Travers


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

Предыдущее
От: "Chris Travers"
Дата:
Сообщение: Re: what we need to use postgresql in the enterprise
Следующее
От: "John Sidney-Woollett"
Дата:
Сообщение: Re: Drawbacks of using BYTEA for PK?