Re: serial type vs. sequences

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: serial type vs. sequences
Дата
Msg-id 20031112211737.GB2077@wolff.to
обсуждение исходный текст
Ответ на serial type vs. sequences  (Suchandra Thapa <s-thapa-11@alumni.uchicago.edu>)
Список pgsql-general
On Wed, Nov 12, 2003 at 14:59:33 -0600,
  Suchandra Thapa <s-thapa-11@alumni.uchicago.edu> wrote:
> I was wondering if there was a reliable method to get the last id
> inserted into a serial column in a table.  I believe previous
> recommendations given were to use a sequence, have your app get the
> nextval for the sequence and then use that in the insert.  I was
> wondering if things had changed or if that is still the recommended
> method.

It is probably a little better to use currval rather than remembering
what nextval returned in your application.

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

Предыдущее
От: Suchandra Thapa
Дата:
Сообщение: serial type vs. sequences
Следующее
От: Christopher Murtagh
Дата:
Сообщение: Re: pl/perl function life and variable scope -