Re: Need help with currval and nextvall...

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Need help with currval and nextvall...
Дата
Msg-id web-1837463@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на Re: Need help with currval and nextvall...  (Dan Jewett <danjewett@mac.com>)
Список 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


В списке pgsql-novice по дате отправления:

Предыдущее
От: Philip Hallstrom
Дата:
Сообщение: Re: Need help with currval and nextvall...
Следующее
От: Hugh Esco
Дата:
Сообщение: Re: [SQL] Problems invoking psql. Help please.