forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit670bf71
committed
Remove dead NULL-pointer checks in GiST code.
gist_poly_compress() and gist_circle_compress() checked for a NULL-pointerkey argument, but that was dead code; the gist code never passes aNULL-pointer to the "compress" method.This commit also removes a documentation note added in commita0a3883,about doing NULL-pointer checks in the "compress" method. It was addedbased on the fact that some implementations were doing NULL-pointerchecks, but those checks were unnecessary in the first place.The NULL-pointer check in gbt_var_same() function was also unnecessary.The arguments to the "same" method come from the "compress", "union", or"picksplit" methods, but none of them return a NULL pointer.None of this is to be confused with SQL NULL values. Those are dealt withby the gist machinery, and are never passed to the GiST opclass methods.Michael Paquier1 parent1a2b203 commit670bf71
File tree
4 files changed
+25
-60
lines changed- contrib/btree_gist
- doc/src/sgml
- src/backend/access/gist
4 files changed
+25
-60
lines changedLines changed: 2 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
147 | 147 |
| |
148 | 148 |
| |
149 | 149 |
| |
150 |
| - | |
151 |
| - | |
152 |
| - | |
153 |
| - | |
154 |
| - | |
155 |
| - | |
156 |
| - | |
| 150 | + | |
| 151 | + | |
157 | 152 |
| |
158 | 153 |
| |
159 | 154 |
| |
|
Lines changed: 2 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
337 | 337 |
| |
338 | 338 |
| |
339 | 339 |
| |
340 |
| - | |
341 | 340 |
| |
342 | 341 |
| |
343 | 342 |
| |
| |||
346 | 345 |
| |
347 | 346 |
| |
348 | 347 |
| |
349 |
| - | |
350 |
| - | |
351 |
| - | |
352 |
| - | |
353 |
| - | |
354 |
| - | |
355 |
| - | |
| 348 | + | |
| 349 | + | |
356 | 350 |
| |
357 | 351 |
| |
358 | 352 |
| |
|
Lines changed: 0 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
497 | 497 |
| |
498 | 498 |
| |
499 | 499 |
| |
500 |
| - | |
501 |
| - | |
502 |
| - | |
503 |
| - | |
504 |
| - | |
505 |
| - | |
506 | 500 |
| |
507 | 501 |
| |
508 | 502 |
| |
|
Lines changed: 21 additions & 39 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1039 | 1039 |
| |
1040 | 1040 |
| |
1041 | 1041 |
| |
1042 |
| - | |
1043 |
| - | |
1044 |
| - | |
1045 |
| - | |
1046 |
| - | |
| 1042 | + | |
| 1043 | + | |
1047 | 1044 |
| |
1048 |
| - | |
1049 |
| - | |
1050 |
| - | |
1051 |
| - | |
1052 |
| - | |
| 1045 | + | |
| 1046 | + | |
1053 | 1047 |
| |
1054 |
| - | |
1055 |
| - | |
1056 |
| - | |
1057 |
| - | |
1058 |
| - | |
1059 |
| - | |
1060 |
| - | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
1061 | 1052 |
| |
1062 | 1053 |
| |
1063 | 1054 |
| |
| |||
1113 | 1104 |
| |
1114 | 1105 |
| |
1115 | 1106 |
| |
1116 |
| - | |
1117 |
| - | |
1118 |
| - | |
1119 |
| - | |
1120 |
| - | |
1121 |
| - | |
1122 |
| - | |
1123 |
| - | |
1124 |
| - | |
1125 |
| - | |
1126 |
| - | |
1127 |
| - | |
1128 |
| - | |
1129 |
| - | |
1130 |
| - | |
1131 |
| - | |
1132 |
| - | |
1133 |
| - | |
1134 |
| - | |
1135 |
| - | |
1136 |
| - | |
1137 |
| - | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
1138 | 1120 |
| |
1139 | 1121 |
| |
1140 | 1122 |
| |
|
0 commit comments
Comments
(0)