Neil Conway <[EMAIL PROTECTED]> writes: > There's already a need to reform the way in which the next value of a > sequence is produced (nextval() makes it difficult to get the dependancy > information right); would it be a good idea to change it to be > completely SQL compatible at the same time?
What do you consider "completely SQL compatible" here? In particular, what is a "statement"? My initial reaction to this part of the SQL draft is that it's broken. Consider plpgsql functions invoked within an interactive statement --- if they invoke nextval() should it fail to increment across repeated attempts? Does your answer change if the functions are invoked as triggers, rather than directly in the text of the statement? How about queries inserted by rule rewriting; are those separate statements for this purpose? In any of these contexts I think you can construct examples that would favor either answer. ISTM that we will have all the same issues with this that we had with the question of when "now()" should increment... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org