Re: if exists?

Поиск
Список
Период
Сортировка
От Dave Carrigan
Тема Re: if exists?
Дата
Msg-id 87it5s6mv7.fsf@cbgb.rudedog.org
обсуждение исходный текст
Ответ на if exists?  (Vincent Stoessel <vincent@xaymaca.com>)
Список pgsql-general
Vincent Stoessel <vincent@xaymaca.com> writes:

> Is there an sql query that I can use on postgres that will tell
> me if a table exists? I'm writing a perl script thatr creates a table.
> But I want it to rename a table with the same name if it finds an
> existing one.

Run 'psql -E', do a \dt, and it will show you the queries it uses to
enumerate the tables.

--
Dave Carrigan (dave@rudedog.org)            | Yow! My Aunt MAUREEN was a
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-DNS | military advisor to IKE & TINA
Seattle, WA, USA                            | TURNER!!
http://www.rudedog.org/                     |

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: if exists?
Следующее
От: Uros Gruber
Дата:
Сообщение: Re: don't know how to get SELECT