I'll jump right in with an example
create sequence foo start with 1;
create view foobar as select *, nextval('foo') from bar;
The problem is I need a nextval()-like method that returns the iterations
without
updating the foo sequence. Therefore, maintaining the sequences original value
by
starting at 1 each time the foobar VIEW is invoked.
This is obviously a simplified example for an larger query dependent on row
order
integrity in a view.
On http://www.postgresql.org/docs/8.1/interactive/functions-sequence.html I did
not
find any way to avoid updating sequences (albeit they are supposed to update by
design and may need to update in order to pull the next in sequence). Nor was I
able
to maintain iteration in a nextval()-like function. Any ideas?
Matt
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match