How can I do conditional 'drop table' in Postgres - Mailing list pgsql-general

From Dragan Matic
Subject How can I do conditional 'drop table' in Postgres
Date
Msg-id 409B6A4C.6070401@panforma.co.yu
Whole thread Raw
Responses Re: How can I do conditional 'drop table' in Postgres  (Shachar Shemesh <psql@shemesh.biz>)
List 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 by date:

Previous
From: Karel Zak
Date:
Subject: Re: Removing OIDs without recreate
Next
From: Együd Csaba
Date:
Subject: Re: Removing OIDs without recreate