Re: Support for grabbing multiple consecutive values with nextval()
От
Peter Eisentraut
Тема
Re: Support for grabbing multiple consecutive values with nextval()
Дата
Msg-id
cc1a80c9-1c6c-0502-f3fa-a6e03b180ade@enterprisedb.com
Ответ на
Support for grabbing multiple consecutive values with nextval() (Jille Timmermans)
Список
Дерево обсуждения
Support for grabbing multiple consecutive values with nextval() Jille Timmermans <jille@quis.cx>
Re: Support for grabbing multiple consecutive values with nextval() Julien Rouhaud <rjuju123@gmail.com>
Re: Support for grabbing multiple consecutive values with nextval() Jille Timmermans <jille@quis.cx>
Re: Support for grabbing multiple consecutive values with nextval() Greg Stark <stark@mit.edu>
Re: Support for grabbing multiple consecutive values with nextval() Jille Timmermans <jille@quis.cx>
Re: Support for grabbing multiple consecutive values with nextval() Ronan Dunklau <ronan.dunklau@aiven.io>
Re: Support for grabbing multiple consecutive values with nextval() Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: Support for grabbing multiple consecutive values with nextval() Jille Timmermans <jille@quis.cx>
Re: Support for grabbing multiple consecutive values with nextval() Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: Support for grabbing multiple consecutive values with nextval() Jille Timmermans <jille@quis.cx>
Re: Support for grabbing multiple consecutive values with nextval() Michael Paquier <michael@paquier.xyz>
Re: Support for grabbing multiple consecutive values with nextval() Ronan Dunklau <ronan.dunklau@aiven.io>
Re: Support for grabbing multiple consecutive values with nextval() Tom Lane <tgl@sss.pgh.pa.us>
Re: Support for grabbing multiple consecutive values with nextval() Tom Lane <tgl@sss.pgh.pa.us>
Re: Support for grabbing multiple consecutive values with nextval() Michael Paquier <michael@paquier.xyz>
Re: Support for grabbing multiple consecutive values with nextval() Michael Paquier <michael@paquier.xyz>
On 27.02.22 10:42, Jille Timmermans wrote: > I wanted to be able to allocate a bunch of numbers from a sequence at > once. Multiple people seem to be struggling with this > (https://stackoverflow.com/questions/896274/select-multiple-ids-from-a-postgresql-sequence, > https://www.depesz.com/2008/03/20/getting-multiple-values-from-sequences/). > > I propose to add an extra argument to nextval() that specifies how many > numbers you want to allocate (default 1). What is the use of this? I note that the stackoverflow question wanted to return multiple sequence values as a result set, whereas your implementation just skips a number of values and returns the last one. At least we should be clear about what we are trying to achieve.
В списке pgsql-hackers по дате отправления
От: Peter Eisentraut
Дата: