How can I do conditional 'drop table' in Postgres

Поиск
Список
Период
Сортировка
От Dragan Matic
Тема How can I do conditional 'drop table' in Postgres
Дата
Msg-id 409B6A4C.6070401@panforma.co.yu
обсуждение исходный текст
Ответы Re: How can I do conditional 'drop table' in Postgres  (Shachar Shemesh <psql@shemesh.biz>)
Список pgsql-general
if exists (select * from sysobjects where id =
object_id(N'[dbo].[pp_fisk]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[pp_fisk]
GO

For instance, this is a valid script in Ms SQL, it will drop table
pp_fisk only if it exists, is there a way to do something similar in
Postgres? Tnx in advance.

Dragan






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

Предыдущее
От: Karel Zak
Дата:
Сообщение: Re: Removing OIDs without recreate
Следующее
От: Együd Csaba
Дата:
Сообщение: Re: Removing OIDs without recreate