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
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