Re: Currval function won't work - Mailing list pgsql-novice

From
Subject Re: Currval function won't work
Date
Msg-id 20051007172657.79890.qmail@web33301.mail.mud.yahoo.com
Whole thread Raw
In response to Currval function won't work  ("Bluebottle" <luckychap@bluebottle.com>)
Responses Re: Currval function won't work
List pgsql-novice

--- Bluebottle <luckychap@bluebottle.com> wrote:

> 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

David, I don't know the answer, but this is how i
would troubleshoot...

what happens when you try...

1. select currval('library.items_itemid_seq');

2. select currval('library.items_itemid_seq');

3. select currval('library.items_itemid_seq') as
NextItemID;

4. select currval('items_itemid_seq') as NextItemID;

do any of these work?  do any break?

good luck.



__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

pgsql-novice by date:

Previous
From:
Date:
Subject: Set Privileges on All Tables (and/or Sequences) at Once
Next
From: Sean Davis
Date:
Subject: Re: Set Privileges on All Tables (and/or Sequences) at