On Feb 25, 2004, at 9:07 PM, Joe Conway wrote:

Eric B.Ridge wrote:
I suppose this is obvious, but it's volatile because *other* backends can change it while the current transaction is still in progress?

No. Other backends don't affect currval, but your own might on a row-by-row basis. Consider:

gotcha. Stated differently, it's not volatile because, by design, it doesn't always produce the same output for the same input.


regression=# select nextval('seq'), currval('seq'), s from generate_series(1,4) as t(s);

OT: generate_series looks useful. Is this only in 7.5?


eric


---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to