> However, if you need to know what value is being given to the
> inserted tuple, much the cleanest solution is to select nextval
> before inserting:
>
> SELECT nextval('sequenceobject');
> INSERT INTO table VALUES(... , value-you-just-got, ...);
>
> If you are always going to do that, then a trigger is a waste of cycles.
He can do:
INSERT INTO table VALUES(... , nextval('sequenceobject'), ...);
and currval() will get him the previous nextval() value.
-- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026