Re: Possible bug: SQL function parameter in window frame definition
Andrew Gierth <andrew@tao11.riddles.org.uk>
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alastair McKinley <a.mckinley@analyticsengines.com>,
"pgsql-general\@lists.postgresql.org" <pgsql-general@lists.postgresql.org>
Date: 2019-09-29T04:43:28Z
Lists: pgsql-hackers, pgsql-general
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes: Tom> However, we need to fix this in all active branches, and I Tom> definitely agree with minimizing the amount of change to back Tom> branches. The fact that the minimal change breaks (or exposes an Tom> oversight in) assign_collations_walker makes it very plausible Tom> that it will also break somebody's third-party code. If we push Tom> the API change further we increase the risk of breaking stuff. Tom> That seems OK in HEAD but not in back branches. We could minimize the chance of breakage in a back-patched fix by having query_tree_walker/mutator iterate the windowClause list itself and invoke the walker only on offset expressions; is it worth it? Walkers that follow the recommended code structure should be unaffected; it only shows up in the collations walker because that treats expressions as the "default" case and tries to explicitly handle all non-expression nodes. -- Andrew (irc:RhodiumToad)
Commits
-
Selectively include window frames in expression walks/mutates.
- 3473f81dd2a3 9.4.25 landed
- d2427f11b28d 9.5.20 landed
- 6db0d7f35917 9.6.16 landed
- ede0ab6ccce4 10.11 landed
- 0a445f27909a 11.6 landed
- 0b11dc01922b 12.1 landed
- b7a1c5539ad3 13.0 landed