Re: using sequences

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: using sequences
Дата
Msg-id 20030613210836.GB20982@wolff.to
обсуждение исходный текст
Ответ на using sequences  (Erik Price <eprice@ptc.com>)
Ответы Re: using sequences  (Erik Price <eprice@ptc.com>)
Список pgsql-general
On Fri, Jun 13, 2003 at 16:26:47 -0400,
  Erik Price <eprice@ptc.com> wrote:
> I have read the manual about sequences and I thought I understood both
> their purpose and how to use them.  When I perform inserts, the sequence
> is updated appropriately.  However, I can't seem to directly access the
> sequence myself.  I always seem to get this message:
>
> be_db=# select currval('news_news_id_seq');
> ERROR:  news_news_id_seq.currval is not yet defined in this session
>
> Can someone explain what is going on?

If you are trying to do this you probably don't really understand sequences.
There aren't any common good reasons for trying to get the value of a sequence
before you have generated a value in the current session.

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

Предыдущее
От: "Maksim Likharev"
Дата:
Сообщение: Re: return records in DB load order??
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] SAP and MySQL ... [and Benchmark]