Skip site navigation (1) Skip section navigation (2)

Currval function won't work

From: "Bluebottle" <luckychap(at)bluebottle(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Currval function won't work
Date: 2005-10-07 23:54:13
Message-ID: 000001c5cb9a$6bd88040$0300a8c0@DavidsPC (view raw or flat)
Thread:
Lists: pgsql-novice
select currval('library.items_itemid_seq') as NextItemID;
ERROR:  currval of sequence "items_itemid_seq" is not yet defined in
this session
 
Note that the nextval function works as expected
 
select nextval('library.items_itemid_seq') as NextItemID;
2313
 
Can somebody please tell me what simple mistake I am making?
 
David

Responses

pgsql-novice by date

Next:From: Andreas KretschmerDate: 2005-10-08 05:30:52
Subject: Re: Get uasers Group membership
Previous:From: Andreas KretschmerDate: 2005-10-07 18:09:44
Subject: Re: Intersection of two time segments

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group