Re: [GENERAL] sequence in select

2006-06-22 Thread Jim Nasby
On Jun 22, 2006, at 9:10 AM, SunWuKung wrote: 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_

[GENERAL] sequence in select

2006-06-22 Thread SunWuKung
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 OR