On Thu, 30 Nov 2000, Thomas Lockhart wrote:
> > Is "if" clause support in PG?
> > for example:
> > "drop table aa if exist"
> > "insert into aa values(1) if not exists select * from aa where i=1"
>
> No. afaict it is not in any SQL standard, so is unlikely to get much
> attention from developers.
Plus, for that second one can't you just do:
INSERT INTO aa SELECT 1 WHERE NOT EXISTS (SELECT * FROM aa WHERE i=1);
- Andrew