How to create trigger if it does not exist

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: pgsql-general(at)postgresql(dot)org
Subject: How to create trigger if it does not exist
Date: 2007-05-26 18:36:48
Message-ID: f39vd0$1lr5$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Reyes 2007-05-26 18:40:23 Re: backup strategies
Previous Message Tom Lane 2007-05-26 18:33:05 Re: why postgresql over other RDBMS