Re: Re: sequence integrity insite begin-commit?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: sequence integrity insite begin-commit?
Дата
Msg-id 22753.990657956@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: sequence integrity insite begin-commit?  (Rob Brown-Bayliss <rob@ZOOstation.cc>)
Список pgsql-novice
Rob Brown-Bayliss <rob@ZOOstation.cc> writes:
>> So what I am doing is begining a transaction, inserting the data,
>> selecting the last_value from the sequence and then commiting the
>> transaction.

last_value is wrong.  currval() will work.  See the many prior
discussions of sequences in the mailing list archives.

            regards, tom lane

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

Предыдущее
От: Rob Brown-Bayliss
Дата:
Сообщение: Re: sequence integrity insite begin-commit?
Следующее
От: Chadwick Rolfs
Дата:
Сообщение: Importing data... (fwd)