forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite353389

Fix partition pruning with IS [NOT] NULL clauses
The original code was unable to prune partitions that could not possiblycontain NULL values, when the query specified less than all columns in amulticolumn partition key. Reorder the if-tests so that it is, and addmore commentary and regression tests.Reported-by: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>Co-authored-by: Dilip Kumar <dilipbalaut@gmail.com>Co-authored-by: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org>Reviewed-by: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>Reviewed-by: amul sul <sulamul@gmail.com>Discussion:https://postgr.es/m/CAFjFpRc7qjLUfXLVBBC_HAnx644sjTYM=qVoT3TJ840HPbsTXw@mail.gmail.com1 parent32df1c9 commite353389
File tree
3 files changed
+90
-36
lines changed- src
- backend/partitioning
- test/regress
- expected
- sql
3 files changed
+90
-36
lines changedLines changed: 42 additions & 36 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
853 | 853 |
| |
854 | 854 |
| |
855 | 855 |
| |
856 |
| - | |
857 |
| - | |
858 |
| - | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
859 | 877 |
| |
860 |
| - | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
861 | 883 |
| |
862 |
| - | |
863 |
| - | |
864 |
| - | |
865 |
| - | |
866 |
| - | |
867 |
| - | |
868 |
| - | |
869 |
| - | |
870 |
| - | |
871 |
| - | |
872 |
| - | |
873 |
| - | |
874 |
| - | |
875 |
| - | |
876 |
| - | |
877 |
| - | |
878 |
| - | |
879 |
| - | |
880 |
| - | |
881 |
| - | |
882 |
| - | |
883 |
| - | |
884 |
| - | |
885 |
| - | |
886 |
| - | |
887 |
| - | |
| 884 | + | |
888 | 885 |
| |
889 |
| - | |
890 |
| - | |
891 |
| - | |
892 |
| - | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
893 | 890 |
| |
894 |
| - | |
| 891 | + | |
895 | 892 |
| |
896 | 893 |
| |
897 | 894 |
| |
898 |
| - | |
| 895 | + | |
899 | 896 |
| |
900 | 897 |
| |
901 | 898 |
| |
902 | 899 |
| |
903 | 900 |
| |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
904 | 910 |
| |
905 | 911 |
| |
906 | 912 |
| |
|
Lines changed: 41 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
993 | 993 |
| |
994 | 994 |
| |
995 | 995 |
| |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
996 | 1037 |
| |
997 | 1038 |
| |
998 | 1039 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
137 | 137 |
| |
138 | 138 |
| |
139 | 139 |
| |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
140 | 147 |
| |
141 | 148 |
| |
142 | 149 |
| |
|
0 commit comments
Comments
(0)