| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера