Re: NEXT VALUE FOR

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: NEXT VALUE FOR
Дата
Msg-id 6116.1412291928@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: NEXT VALUE FOR  (Thomas Munro <munro@ip9.org>)
Ответы Re: NEXT VALUE FOR
Список pgsql-hackers
Thomas Munro <munro@ip9.org> writes:
> On 2 October 2014 14:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Have you checked the archives about this?  My recollection is that one
>> reason it's not in there (aside from having to reserve "NEXT") is that
>> the standard-mandated semantics are not the same as nextval().

> Right, I found the problem: "If there are multiple instances of <next value
> expression>s specifying the same sequence generator within a single
> SQL-statement, all those instances return the same value for a
> given row processed by that SQL-statement."  This was discussed in a thread
> from 2002 [1].

Wow, it was that far back?  No wonder I didn't remember the details.

> I suppose one approach would be to use command
> IDs as the scope.

The spec clearly says one value per row, not one per statement; so
command ID is very definitely not the right thing.
        regards, tom lane



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

Предыдущее
От: Marti Raudsepp
Дата:
Сообщение: Re: CREATE IF NOT EXISTS INDEX
Следующее
От: Joe Conway
Дата:
Сообщение: Re: DDL Damage Assessment