forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6b66dba
committed
Compare collations before merging UNION operations.
In the dim past we figured it was okay to ignore collationswhen combining UNION set-operation nodes into a single N-wayUNION operation. I believe that was fine at the time, butit stopped being fine when we added nondeterministic collations:the semantics of distinct-ness are affected by those. v17 madeit even less fine by allowing per-child sorting operations tobe merged via MergeAppend, although I think we accidentallyavoided any live bug from that.Add a check that collations match before deciding that twoUNION nodes are equivalent. I also failed to resist thetemptation to comment plan_union_children() a little better.Back-patch to all supported branches (v13 now), since theyall have nondeterministic collations.Discussion:https://postgr.es/m/3605568.1731970579@sss.pgh.pa.us1 parent4f8df7a commit6b66dba
1 file changed
+11
-12
lines changedLines changed: 11 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
569 | 569 |
| |
570 | 570 |
| |
571 | 571 |
| |
572 |
| - | |
573 |
| - | |
574 |
| - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
575 | 575 |
| |
576 | 576 |
| |
577 | 577 |
| |
| |||
860 | 860 |
| |
861 | 861 |
| |
862 | 862 |
| |
863 |
| - | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
864 | 869 |
| |
865 | 870 |
| |
866 | 871 |
| |
867 |
| - | |
868 |
| - | |
869 |
| - | |
870 |
| - | |
871 |
| - | |
872 |
| - | |
873 |
| - | |
874 | 872 |
| |
875 | 873 |
| |
876 | 874 |
| |
| |||
896 | 894 |
| |
897 | 895 |
| |
898 | 896 |
| |
899 |
| - | |
| 897 | + | |
| 898 | + | |
900 | 899 |
| |
901 | 900 |
| |
902 | 901 |
| |
|
0 commit comments
Comments
(0)