> 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?
To get the id of the row inserted, use INSERT RETURNING. Or currval('bla2').
In response to
pgsql-bugs by date
|Next:||From: Dr. Björn Weitzig||Date: 2009-03-02 12:33:50|
|Subject: Re: BUG #4638: Bug with Geometry in Array|
|Previous:||From: Tom Lane||Date: 2009-02-28 16:09:55|
|Subject: Re: BUG #4684: lastval in function |