Re: sequenc_name.currval not defined

Поиск
Список
Период
Сортировка
От Philip Hallstrom
Тема Re: sequenc_name.currval not defined
Дата
Msg-id 20021121150727.Q72914-100000@cypress.adhesivemedia.com
обсуждение исходный текст
Ответ на sequenc_name.currval not defined  (MT <mt@open2web.com>)
Список pgsql-general
you have to call nextval() before you can use currval().

On Thu, 21 Nov 2002, MT wrote:

> Hi,
>
> I keep on getting the following error when I attempt to insert a new record:
>
> SELECT * FROM table_name WHERE tableid = currval('tableid_seq');
>
> PostgreSQL said: ERROR: tableid_seq.currval is not yet defined in this
> session.
>
> What's weird about this problem is that I have a script that
> successfully performs this action.
>
> Thanks for your help,
>
> Mark
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


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

Предыдущее
От: "Andy Kriger"
Дата:
Сообщение: how do i find out when a record was created/modified?
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: sequenc_name.currval not defined