sequence in select

Поиск
Список
Период
Сортировка
От SunWuKung
Тема sequence in select
Дата
Msg-id 1150985438.469854.222130@i40g2000cwc.googlegroups.com
обсуждение исходный текст
Ответы Re: sequence in select  (Jim Nasby <jnasby@pervasive.com>)
Список pgsql-general
Hi,
I put the following into a function. Is this always going to give me a
sequence with an increment of 1 independently from other transactions?
If not what would be the standard way to return a sequence from a
query?

CREATE TEMPORARY SEQUENCE rank_seq;
SELECT nextval('rank_seq') FROM whatever ORDER BY id;
DROP SEQUENCE rank_seq;

thx.
Balázs


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

Предыдущее
От: "Thomas Chille"
Дата:
Сообщение: Re: simple query terminated by signal 11
Следующее
От: "Alejandro Michelin Salomon \( Adinet \)"
Дата:
Сообщение: Download pl/python