aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ruleutils.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2024-11-19 18:26:19 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2024-11-19 18:26:19 -0500
commita43d7a8c7cce00e3fcf330e201a3a94f97097e64 (patch)
treebc904a12d7c34a9a1f30617434e403fb5c756b8f /src/backend/utils/adt/ruleutils.c
parentc166454496876818216e222890ab1ae788551c42 (diff)
downloadpostgresql-a43d7a8c7cce00e3fcf330e201a3a94f97097e64.tar.gz
postgresql-a43d7a8c7cce00e3fcf330e201a3a94f97097e64.zip
Compare collations before merging UNION operations.
In the dim past we figured it was okay to ignore collations when combining UNION set-operation nodes into a single N-way UNION operation. I believe that was fine at the time, but it stopped being fine when we added nondeterministic collations: the semantics of distinct-ness are affected by those. v17 made it even less fine by allowing per-child sorting operations to be merged via MergeAppend, although I think we accidentally avoided any live bug from that. Add a check that collations match before deciding that two UNION nodes are equivalent. I also failed to resist the temptation to comment plan_union_children() a little better. Back-patch to all supported branches (v13 now), since they all have nondeterministic collations. Discussion: https://postgr.es/m/3605568.1731970579@sss.pgh.pa.us
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
0 files changed, 0 insertions, 0 deletions