sequence in select - Mailing list pgsql-general

From SunWuKung
Subject sequence in select
Date
Msg-id 1150985438.469854.222130@i40g2000cwc.googlegroups.com
Whole thread Raw
Responses Re: sequence in select  (Jim Nasby <jnasby@pervasive.com>)
List 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 by date:

Previous
From: "Thomas Chille"
Date:
Subject: Re: simple query terminated by signal 11
Next
From: "Alejandro Michelin Salomon \( Adinet \)"
Date:
Subject: Download pl/python