On Feb 26, 2004, at 3:10 PM, Greg Stark wrote:
> Joe Conway <mail(at)joeconway(dot)com> writes:
>
>> Eric B. Ridge wrote:
>>> gotcha. Stated differently, it's not volatile because, by design,
>>> it doesn't
>>> always produce the same output for the same input.
>>
>> Right. But further, it doesn't even produce the same result within a
>> single
>> scan. Here's from pg_proc.h:
>
> Consider a query like
>
> select * from foo where a = currval('xyz') and b = nextval('xyz')
yeah, it never even occurred to me, until Joe Conway's comment
yesterday, that one could (or even would!) use nextval() and currval()
together in the same statement.
eric