aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/stringutils.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-06-01 11:12:56 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-06-01 11:12:56 -0400
commit762fe98b1ba63101bbf1fe8fcd1e23532d2c4f41 (patch)
treef350ee824deae9a9ad50da0a14ae3fd6f532f4b8 /src/bin/psql/stringutils.c
parent02037af3ff36d7a9023251c2fa4dc4efaa67bbf2 (diff)
downloadpostgresql-762fe98b1ba63101bbf1fe8fcd1e23532d2c4f41.tar.gz
postgresql-762fe98b1ba63101bbf1fe8fcd1e23532d2c4f41.zip
Reject SELECT ... GROUP BY GROUPING SETS (()) FOR UPDATE.
This case should be disallowed, just as FOR UPDATE with a plain GROUP BY is disallowed; FOR UPDATE only makes sense when each row of the query result can be identified with a single table row. However, we missed teaching CheckSelectLocking() to check groupingSets as well as groupClause, so that it would allow degenerate grouping sets. That resulted in a bad plan and a null-pointer dereference in the executor. Looking around for other instances of the same bug, the only one I found was in examine_simple_variable(). That'd just lead to silly estimates, but it should be fixed too. Per private report from Yaoguang Chen. Back-patch to all supported branches.
Diffstat (limited to 'src/bin/psql/stringutils.c')
0 files changed, 0 insertions, 0 deletions