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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

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