Re: Need help with currval and nextvall... - Mailing list pgsql-novice

From Philip Hallstrom
Subject Re: Need help with currval and nextvall...
Date
Msg-id 20021122113631.G96553-100000@cypress.adhesivemedia.com
Whole thread Raw
In response to Re: Need help with currval and nextvall...  (Dan Jewett <danjewett@mac.com>)
List pgsql-novice
> >You need to quote (single quotes) the name of the sequence... and you need
> >to use nextval('album_album_id_seq') before calling currval().
> >
> >At least I think so.
>
> Thanks Phillip,
>
> I know I'm supposed to have the quotes but I keep getting :
> PostgreSQL said: ERROR: parser: parse error at or near
> "album_album_id_seq"  unless I take them out.
>
> I also tried nextval() with the same error returned: ERROR: Attribute
> 'album_album_id_seq' not found.

Huh... well, what happens if you just run:

SELECT NEXTVAL('album_album_id_seq');

directly in psql?

-philip


pgsql-novice by date:

Previous
From: Dan Jewett
Date:
Subject: Re: Need help with currval and nextvall...
Next
From: "Josh Berkus"
Date:
Subject: Re: Need help with currval and nextvall...