forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc6a11b8
committed
Teach SPGiST to store nulls and do whole-index scans.
This patch fixes the other major compatibility-breaking limitation ofSPGiST, that it didn't store anything for null values of the indexedcolumn, and so could not support whole-index scans or "x IS NULL"tests. The approach is to create a wholly separate search tree forthe null entries, and use fixed "allTheSame" insertion and searchrules when processing this tree, instead of calling the index opclassmethods. This way the opclass methods do not need to worry aboutdealing with nulls.Catversion bump is for pg_am updates as well as the change in on-diskformat of SPGiST indexes; there are some tweaks in SPGiST WAL recordsas well.Heavily rewritten version of a patch by Oleg Bartunov and Teodor Sigaev.(The original also stored nulls separately, but it reused GIN code to doso; which required undesirable compromises in the on-disk format, andwould likely lead to bugs due to the GIN code being required to work intwo very different contexts.)1 parentfc227a4 commitc6a11b8
File tree
13 files changed
+534
-166
lines changed- doc/src/sgml
- src
- backend/access/spgist
- include
- access
- catalog
- test/regress
- expected
- sql
13 files changed
+534
-166
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
100 | 100 |
| |
101 | 101 |
| |
102 | 102 |
| |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
103 | 115 |
| |
104 | 116 |
| |
105 | 117 |
| |
|
Lines changed: 27 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| 14 | + | |
14 | 15 |
| |
15 | 16 |
| |
16 | 17 |
| |
| |||
71 | 72 |
| |
72 | 73 |
| |
73 | 74 |
| |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
74 | 90 |
| |
75 | 91 |
| |
76 | 92 |
| |
| |||
181 | 197 |
| |
182 | 198 |
| |
183 | 199 |
| |
| 200 | + | |
184 | 201 |
| |
185 | 202 |
| |
186 | 203 |
| |
| |||
218 | 235 |
| |
219 | 236 |
| |
220 | 237 |
| |
| 238 | + | |
221 | 239 |
| |
222 | 240 |
| |
223 | 241 |
| |
| |||
269 | 287 |
| |
270 | 288 |
| |
271 | 289 |
| |
| 290 | + | |
272 | 291 |
| |
273 | 292 |
| |
274 | 293 |
| |
| |||
302 | 321 |
| |
303 | 322 |
| |
304 | 323 |
| |
| 324 | + | |
305 | 325 |
| |
306 | 326 |
| |
307 |
| - | |
308 |
| - | |
309 |
| - | |
310 |
| - | |
311 |
| - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
312 | 334 |
| |
313 | 335 |
| |
314 | 336 |
| |
|
0 commit comments
Comments
(0)