I have a script that sets up my databases which I run whenever I change any
of the functions. It has a number of things it does that are unnecessary
and cause errors. I create some types, sequences, etc. The error messages
are irritating. I'd like to do something like this:
IF NOT EXISTS (SELECT relname FROM pg_class WHERE relname='seqid')
CREATE SEQUENCE SeqID;
This works in other SQL languages like SQLServer and MySQL. Is there
anything like this in PostgreSQL?
--
View this message in context: http://www.nabble.com/IF-EXISTS-tf2308139.html#a6416894
Sent from the PostgreSQL - general mailing list archive at Nabble.com.