Commit 560564d
committed
Enable hash partitioning of text arrays
hash_array_extended() needs to pass PG_GET_COLLATION() to the hash
function of the element type. Otherwise, the hash function of a
collation-aware data type such as text will error out, since the
introduction of nondeterministic collation made hash functions require
a collation, too.
The consequence of this is that before this change, hash partitioning
using an array over text in the partition key would not work.
Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/flat/32c1fdae-95c6-5dc6-058a-a90330a3b621%40enterprisedb.com1 parent 37d2ff3 commit 560564d
File tree
3 files changed
+77
-1
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+77
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4071 | 4071 | | |
4072 | 4072 | | |
4073 | 4073 | | |
4074 | | - | |
| 4074 | + | |
4075 | 4075 | | |
4076 | 4076 | | |
4077 | 4077 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1212 | 1212 | | |
1213 | 1213 | | |
1214 | 1214 | | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
1215 | 1239 | | |
1216 | 1240 | | |
1217 | 1241 | | |
| |||
1839 | 1863 | | |
1840 | 1864 | | |
1841 | 1865 | | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
1842 | 1879 | | |
1843 | 1880 | | |
1844 | 1881 | | |
| |||
1851 | 1888 | | |
1852 | 1889 | | |
1853 | 1890 | | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
1854 | 1904 | | |
1855 | 1905 | | |
1856 | 1906 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
481 | 489 | | |
482 | 490 | | |
483 | 491 | | |
| |||
680 | 688 | | |
681 | 689 | | |
682 | 690 | | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
683 | 700 | | |
684 | 701 | | |
685 | 702 | | |
| |||
688 | 705 | | |
689 | 706 | | |
690 | 707 | | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
691 | 717 | | |
692 | 718 | | |
693 | 719 | | |
| |||
0 commit comments