Re: simple trigger question ...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: simple trigger question ...
Date: 2003-04-03 04:16:13
Message-ID: 25512.1049343373@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Marc G. Fournier" <scrappy(at)hub(dot)org> writes:
>> Er ... you just want to bump the sequence and throw away the actual
>> value? You don't want to store the value somewhere?

> Correct

Then you need something like (untested)

CREATE FUNCTION mytrig() RETURNS TRIGGER AS '
begin
perform nextval(''seq'');
return new;
end' LANGUAGE plpgsql;

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Marc G. Fournier 2003-04-03 04:31:20 Re: simple trigger question ...
Previous Message Marc G. Fournier 2003-04-03 04:06:23 Re: simple trigger question ...