Re: SQL: how to find if a table exists?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: SQL: how to find if a table exists?
Дата
Msg-id 200209091543.51581.dev@archonet.com
обсуждение исходный текст
Ответ на SQL: how to find if a table exists?  (Jean-Christian Imbeault <totsubo2001@netscape.net>)
Список pgsql-general
On Saturday 07 Sep 2002 2:36 pm, Jean-Christian Imbeault wrote:
> I need to programmatically create a table if it does not already exists.
>
> Is there an SQL statement that will allow me to query a DB to see if a
> table exists?

select * from pg_tables

is about what you want. There are a bunch of other useful system-tables - see
the manual for details. Also you might want to start psql with -E and see
what \dt does.

- Richard Huxton

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

Предыдущее
От: Jan Ploski
Дата:
Сообщение: Re: Is there a way to query whether a table has been changed or not?
Следующее
От: Christoph Dalitz
Дата:
Сообщение: Re: recommended books???