if exists / where exisyts.... - Mailing list pgsql-interfaces

From Denis Cartier Millon
Subject if exists / where exisyts....
Date
Msg-id 3CEE4A50.2090802@Wanadoo.fr
Whole thread Raw
Responses Re: if exists / where exisyts....  (Ron Johnson <ron.l.johnson@cox.net>)
List pgsql-interfaces
i want to test if a table exists before to drop this......

the :
if exists (select 1 from pg_tables where tablename = "thetable")
drop table thetable
;

don't work....

i try :

wher e exists (....)
;

don't work.


but the expresssion :
select * from pg_tables where exists(select 1 from pg_tables where 
tablename = "thetable")
;

work






pgsql-interfaces by date:

Previous
From: Ron Johnson
Date:
Subject: Re: libpq - description of columns
Next
From: Ron Johnson
Date:
Subject: Re: if exists / where exisyts....