Denis Woodbury <denis@woodmic.net> writes:
> I would like to know if this this type of statement can be used in
> Postgresql
> IF NOT EXISTS (SELECT 1 FROM Table WHERE col1 = 'mystring' )
> BEGIN
> ...
> END
I suspect you are trying to type that directly into SQL.
You need to be using plpgsql in order to use procedural
logic (ie, if/then).
regards, tom lane