"Josh Berkus" <josh@agliodbs.com> writes:
>> I believe that I can replace this in Postgres with:
>>
>> insert into TABLE (id1,.......,id2)
>> values (nextval('DataId'),.....,currval('DataId');
>>
>> What I think is expected is that the values of id1 and id2 will be
>> equal.
> This is correct.
Well ... it's relying on the assumption that the elements of the VALUES
list will be evaluated left-to-right. Which is true at the moment,
and I don't really expect it to change, but it still could be called an
unsafe dependency on undocumented implementation details. I doubt you
will find anything in the SQL spec that requires implementations to
behave that way.
regards, tom lane