> If you want PostgreSQL to populate your idmember field with the next > value from the sequence, you need to specify the keyword DEFAULT as its > value or omit it from the INSERT list of coulumns (this assumes you have
I do omit it.
> DEFAULT nextval('members_idmember_seq') defined on the idmember column).
I use CREATE TABLE "members" (idmember" SERIAL PRIMARY KEY, ...);
> Should be : > > Cmd = "SELECT currval('members_idmember_seq');"
Ah, thanks for the shorter syntax.
> Remember that there's no such thing as auto-increment fields in > PostgreSQL - they are SEQUENCES.
I know.
So, it's the best or reasonable practice(TM), isn't it?
-- Milos Prudek
---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org