- Notifications
You must be signed in to change notification settings - Fork5
Commit7b8a63c
committed
Alter the xxx_pattern_ops opclasses to use the regular equality operator of
the associated datatype as their equality member. This means that theseopclasses can now support plain equality comparisons along with LIKE tests,thus avoiding the need for an extra index in some applications. Thisoptimization was not possible when the pattern opclasses were first introduced,because we didn't insist that text equality meant bitwise equality; but wedo now, so there is no semantic difference between regular and patternequality operators.I removed the name_pattern_ops opclass altogether, since it's really useless:name's regular comparisons are just strcmp() and are unlikely to becomesomething different. Instead teach indxpath.c that btree name_ops can beused for LIKE whether or not the locale is C. This might lead to a usefulspeedup in LIKE queries on the system catalogs in non-C locales.The ~=~ and ~<>~ operators are gone altogether. (It would have been nice tokeep them for backward compatibility's sake, but since the pg_amop structuredoesn't allow multiple equality operators per opclass, there's no way.)A not-immediately-obvious incompatibility is that the sort order withinbpchar_pattern_ops indexes changes --- it had been identical to plainstrcmp, but is now trailing-blank-insensitive. This will impactin-place upgrades, if those ever happen.Per discussions a couple months ago.1 parenta3d9a24 commit7b8a63c
File tree
15 files changed
+168
-213
lines changed- doc/src/sgml
- src
- backend
- access/nbtree
- optimizer/path
- utils/adt
- include
- catalog
- utils
- test/regress/expected
15 files changed
+168
-213
lines changedLines changed: 10 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
906 | 906 |
| |
907 | 907 |
| |
908 | 908 |
| |
909 |
| - | |
910 |
| - | |
911 |
| - | |
912 |
| - | |
913 |
| - | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
914 | 913 |
| |
915 | 914 |
| |
916 | 915 |
| |
| |||
923 | 922 |
| |
924 | 923 |
| |
925 | 924 |
| |
926 |
| - | |
927 |
| - | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
928 | 928 |
| |
929 |
| - | |
| 929 | + | |
| 930 | + | |
930 | 931 |
| |
931 | 932 |
| |
932 | 933 |
| |
|
Lines changed: 1 addition & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
237 | 237 |
| |
238 | 238 |
| |
239 | 239 |
| |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 |
| - |
Lines changed: 3 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
2178 | 2178 |
| |
2179 | 2179 |
| |
2180 | 2180 |
| |
2181 |
| - | |
2182 |
| - | |
2183 |
| - | |
| 2181 | + | |
| 2182 | + | |
2184 | 2183 |
| |
2185 | 2184 |
| |
2186 | 2185 |
| |
| |||
2700 | 2699 |
| |
2701 | 2700 |
| |
2702 | 2701 |
| |
2703 |
| - | |
2704 | 2702 |
| |
2705 | 2703 |
| |
2706 | 2704 |
| |
|
Lines changed: 1 addition & 60 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| |||
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 |
| - | |
189 |
| - | |
190 |
| - | |
191 |
| - | |
192 |
| - | |
193 |
| - | |
194 |
| - | |
195 |
| - | |
196 |
| - | |
197 |
| - | |
198 |
| - | |
199 |
| - | |
200 |
| - | |
201 |
| - | |
202 |
| - | |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
208 |
| - | |
209 |
| - | |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 |
| - | |
217 |
| - | |
218 |
| - | |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 | 184 |
| |
244 | 185 |
| |
245 | 186 |
| |
|
Lines changed: 110 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
886 | 886 |
| |
887 | 887 |
| |
888 | 888 |
| |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + |
Lines changed: 12 additions & 45 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
1309 | 1309 |
| |
1310 | 1310 |
| |
1311 | 1311 |
| |
1312 |
| - | |
1313 |
| - | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
1314 | 1315 |
| |
1315 | 1316 |
| |
1316 | 1317 |
| |
1317 | 1318 |
| |
1318 | 1319 |
| |
1319 | 1320 |
| |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
1320 | 1326 |
| |
1321 |
| - | |
1322 |
| - | |
| 1327 | + | |
1323 | 1328 |
| |
1324 | 1329 |
| |
1325 |
| - | |
| 1330 | + | |
1326 | 1331 |
| |
1327 |
| - | |
| 1332 | + | |
1328 | 1333 |
| |
1329 | 1334 |
| |
1330 | 1335 |
| |
| |||
1363 | 1368 |
| |
1364 | 1369 |
| |
1365 | 1370 |
| |
1366 |
| - | |
1367 |
| - | |
1368 |
| - | |
1369 |
| - | |
1370 |
| - | |
1371 |
| - | |
1372 |
| - | |
1373 |
| - | |
1374 |
| - | |
1375 |
| - | |
1376 |
| - | |
1377 |
| - | |
1378 |
| - | |
1379 |
| - | |
1380 |
| - | |
1381 |
| - | |
1382 |
| - | |
1383 |
| - | |
1384 |
| - | |
1385 | 1371 |
| |
1386 | 1372 |
| |
1387 | 1373 |
| |
| |||
1414 | 1400 |
| |
1415 | 1401 |
| |
1416 | 1402 |
| |
1417 |
| - | |
1418 |
| - | |
1419 |
| - | |
1420 |
| - | |
1421 |
| - | |
1422 |
| - | |
1423 |
| - | |
1424 |
| - | |
1425 |
| - | |
1426 |
| - | |
1427 |
| - | |
1428 |
| - | |
1429 |
| - | |
1430 |
| - | |
1431 |
| - | |
1432 |
| - | |
1433 |
| - | |
1434 |
| - | |
1435 |
| - | |
1436 | 1403 |
| |
1437 | 1404 |
| |
1438 | 1405 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 |
| - | |
| 56 | + | |
57 | 57 |
| |
58 | 58 |
|
0 commit comments
Comments
(0)