Re: determine if a table exists

Поиск
Список
Период
Сортировка
От Christoph Haller
Тема Re: determine if a table exists
Дата
Msg-id 200208011042.MAA22571@rodos
обсуждение исходный текст
Ответ на determine if a table exists  (Joseph Syjuco <joseph@asti.dost.gov.ph>)
Список pgsql-sql
> 
> how do i determine if a table exists using select statement
> i want to find out if it exists if not ill create it if yes then ill do
> some editing with it
> TIA
> 
do 
SELECT relname FROM pg_class       WHERE relkind='r'       AND relname !~ '^pg_'       AND relname !~ '^pga_'       AND
relname!~ '^pgadmin_';
 

You should also refer to Chapter 3. System Catalogs 
in the Documentation. 

Regards, Christoph 


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

Предыдущее
От: Joseph Syjuco
Дата:
Сообщение: determine if a table exists
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Function problems, cache lookup failed