Selective sequence.. - Mailing list pgsql-novice

From Timo Tuomi
Subject Selective sequence..
Date
Msg-id 004c01c29d4a$eec4c990$7e00a8c0@bonham
Whole thread Raw
List pgsql-novice
Hello Gurus,

I would like to have a table 'members' with columns 'memberid' and
'member_role' implemented so that when I add a member it automatically
inserts a nextval('memberid') into the memberid field ONLY if
member_role='a_particular_role' otherwise 0.

I have a strong feeling that it's not too complicated at all, but I could
use a hint.

Thanks,
Timo


pgsql-novice by date:

Previous
From: Vijay Deval
Date:
Subject: Re: tcl script
Next
From: "Josh Berkus"
Date:
Subject: Re: Test to see if currval will fail?