Re: [SQL] return value of the trigger function

2005-01-15 Thread Bruno Wolff III
On Mon, Jan 10, 2005 at 15:15:33 +0100, Jarek Pude?ko <[EMAIL PROTECTED]> wrote: > Hi > > I have big problem with a trigger function. > Defs: > > CREATE TABLE foo (id int2, name varchar(20)); > > foo.id cannot be serial or autoint because it will not be unique. > > Now I need a trigger that r

[SQL] return value of the trigger function

2005-01-14 Thread Jarek Pudełko
Hi I have big problem with a trigger function. Defs: CREATE TABLE foo (id int2, name varchar(20)); foo.id cannot be serial or autoint because it will not be unique. Now I need a trigger that return foo.id of the inserted record. INSERT INTO foo VALUES (max(foo.id)+1,'junk'); IMHO the trigger should