Heikki Linnakangas schrieb:
andreas wrote:
if nextval is used inside a function in a insertstatement, you get always
the value from inside the last function. but i expected, that lastval()
deliver the value from the insertstatement. i think, this should clearify in the documentation, or better fixed that the nextval from an insertstatement
is called after the functioncalls.

Well, others might expect the opposite, like existing applications. Want to suggest wording for the documentation?

Yes, existing applications might be involved. But i think, this is a
very rare situation. But if someone use an insertstatement with a
functioncall, but the function do NOT use nextval, and he use lastval to
estimate the last inserted value he has no problems. But if then someone
change the function so the function use nextval then the application
crashes. So i think it is much more better to change the behavior,
because this is what i expect. And i think, this is what others
expect too.

Andreas

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to