Re: Need help with currval and nextvall...

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Dan Jewett <danjewett(at)mac(dot)com>, Philip Hallstrom <philip(at)adhesivemedia(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Need help with currval and nextvall...
Date: 2002-11-22 19:43:50
Message-ID: web-1837463@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Dan,

> 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.

Because you're "nesting" quotes in a function, you'll need to double
them:
SELECT CURRVAL(''album_album_id_seq'')

And you should *not* call Nextval; the INSERT is doing that already
because of the SERIAL type on your table.

-Josh Berkus

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Eric B.Ridge 2002-11-22 21:29:07 UNION and array types
Previous Message Philip Hallstrom 2002-11-22 19:36:54 Re: Need help with currval and nextvall...