John Naylor <john.nay...@2ndquadrant.com> writes: > I believe it's actually "lower than Op", and since POSTFIXOP is gone > it doesn't seem to matter how low it is. In fact, I found that the > lines with INDENT and UNBOUNDED now work as the lowest precedence > declarations. Maybe that's worth something?
> Following on Peter E.'s example upthread, GENERATED can be removed > from precedence, and I also found the same is true for PRESERVE and > STRIP_P. Now that the main patch is pushed, I went back to revisit this precedence issue. I'm afraid to move the precedence of IDENT as much as you suggest here. The comment for opt_existing_window_name says that it's expecting the precedence of IDENT to be just below that of Op. If there's daylight in between, that could result in funny behavior for use of some of the unreserved words with other precedence levels in this context. However, I concur that we ought to be able to remove the explicit precedences for GENERATED, NULL_P, PRESERVE, and STRIP_P, so I did that. An interesting point is that it's actually possible to remove the precedence declaration for IDENT itself (at least, that does not create any bison errors; I did not do any behavioral testing). I believe what we had that for originally was to control the precedence behavior of the "target_el: a_expr IDENT" rule, and now that that rule doesn't end with IDENT, its behavior isn't governed by that. But I think we're best off to keep the precedence assignment, as a place to hang the precedences of PARTITION etc. regards, tom lane