Andrus ha escrito:
> CREATE TRIGGER mycheck_trigger BEFORE INSERT OR UPDATE ON mytbl
> FOR EACH ROW EXECUTE PROCEDURE mycheck_pkey();
>
> aborts transaction if trigger already exists.
>
> There in no CREATE OR REPLACE TRIGGER command in PostgreSQL
>
> How to create trigger only when it does not exist ?
>
> Andrus.
DROP TRIGGER IF EXISTS...
See:
http://www.postgresql.org/docs/8.2/static/sql-droptrigger.html