simple trigger question ...

From: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: simple trigger question ...
Date: 2003-04-03 02:41:42
Message-ID: 20030402223933.M71125@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


I want to create a trigger on a table that for every insert, in performs a
nextval on a sequence ...

Something like:

CREATE TRIGGER on_company_company_id_seq
AFTER INSERT ON company FOR EACH ROW
EXECUTE PROCEDURE nextval('company_company_id_seq');

I'm embaressingly new at triggers ... is this possible?

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-04-03 03:44:37 Re: simple trigger question ...
Previous Message Walter McGinnis 2003-04-02 17:35:54 Re: pesky plpgsql