Conditional statements? - Mailing list pgsql-general

From Mark Alliban
Subject Conditional statements?
Date
Msg-id 002a01c02174$69b5f7f0$0e0410ac@teledome.com
Whole thread Raw
List pgsql-general
Hi,

I was wondering if it is possible to have conditional statements in
postgres, like there are in M$SQL?

Simplified example:
IF NOT EXISTS(SELECT * FROM testtable WHERE id=3)
    INSERT INTO testtable (id) VALUES (3)

TIA,
Mark.



pgsql-general by date:

Previous
From: "Erich Cadario"
Date:
Subject: SQL-Error
Next
From: "Rob Hutton"
Date:
Subject: Several questions