Re: How can I check whether a table is existing or not

Поиск
Список
Период
Сортировка
От Manuel Sugawara
Тема Re: How can I check whether a table is existing or not
Дата
Msg-id m3n1e0tfgk.fsf@dep3.fciencias.unam.mx
обсуждение исходный текст
Ответ на How can I check whether a table is existing or not  (Hans-Jürgen Schönig <hs@cybertec.at>)
Список pgsql-interfaces
Hans-J�rgen Sch�nig <hs@cybertec.at> writes:

> I am using Perl/DBI and I want to know whether I can check if a certain
> table is in the database or not.
> How can I do that without getting "ugly" messages on STDERR?

You can query the system catalogs for the relation you are interested
in; The following query might help:

SELECT c.relname FROM pg_class c WHERE c.relname = 'my_table';

where my_table is the name of the table you are looking for.

Regards,
Manuel.


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

Предыдущее
От: Andrew Nosenko
Дата:
Сообщение: Re: StarOffice 5.2 for Linux and ODBC
Следующее
От: Katsuyuki Tanaka
Дата:
Сообщение: passwd