by yazicivo@[EMAIL PROTECTED]
(Volkan YAZICI)
Jun 13, 2008 at 03:31 PM
"Shavonne Marietta Wijesinghe" <shavonne.marietta@[EMAIL PROTECTED]
> writes:
> IF (table not found) THEN
> CREATE TABLE distributors (
> did integer,
> name varchar(40),
> UNIQUE(name)
> );
> END IF
Assuming you're in a procedure (above code snippet looks to be executed
within a PL/pgsql procedure):
IF EXISTS (SELECT 1
FROM information_schema.tables
WHERE table_schema = 'public' AND
table_name = 'distributors)
THEN ...
END IF;
Regards.
--
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql