forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4380362
committed
Don't cast between GinNullCategory and bool
The original idea was that we could use an isNull-style bool arraydirectly as a GinNullCategory array. However, the existing code alreadyacknowledges that that doesn't really work, because of the possibilitythat bool as currently defined can have arbitrary bit patterns for truevalues. So it has to loop through the nullFlags array to set each boolvalue to an acceptable value. But if we are looping through the wholearray anyway, we might as well build a proper GinNullCategory arrayinstead and abandon the type casting. That makes the code much safer incase bool is ever changed to something else.Reviewed-by: Michael Paquier <michael.paquier@gmail.com>1 parent93ea78b commit4380362
File tree
3 files changed
+21
-23
lines changed- src
- backend/access/gin
- include/access
3 files changed
+21
-23
lines changedLines changed: 8 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
295 | 295 |
| |
296 | 296 |
| |
297 | 297 |
| |
| 298 | + | |
298 | 299 |
| |
299 | 300 |
| |
300 | 301 |
| |
| |||
346 | 347 |
| |
347 | 348 |
| |
348 | 349 |
| |
349 |
| - | |
350 |
| - | |
351 |
| - | |
352 |
| - | |
353 |
| - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
354 | 353 |
| |
355 |
| - | |
356 |
| - | |
357 |
| - | |
| 354 | + | |
| 355 | + | |
358 | 356 |
| |
359 | 357 |
| |
360 | 358 |
| |
361 | 359 |
| |
362 | 360 |
| |
363 | 361 |
| |
364 | 362 |
| |
365 |
| - | |
| 363 | + | |
366 | 364 |
| |
367 | 365 |
| |
368 | 366 |
| |
369 | 367 |
| |
370 |
| - | |
371 | 368 |
| |
372 | 369 |
| |
373 | 370 |
| |
374 | 371 |
| |
375 |
| - | |
| 372 | + | |
376 | 373 |
| |
377 | 374 |
| |
378 | 375 |
| |
|
Lines changed: 8 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
529 | 529 |
| |
530 | 530 |
| |
531 | 531 |
| |
532 |
| - | |
533 |
| - | |
534 |
| - | |
| 532 | + | |
535 | 533 |
| |
536 | 534 |
| |
537 | 535 |
| |
538 |
| - | |
539 |
| - | |
540 |
| - | |
541 |
| - | |
542 |
| - | |
543 |
| - | |
544 |
| - | |
545 | 536 |
| |
546 | 537 |
| |
547 | 538 |
| |
| |||
600 | 591 |
| |
601 | 592 |
| |
602 | 593 |
| |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
603 | 601 |
| |
604 | 602 |
| |
605 | 603 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
188 | 188 |
| |
189 | 189 |
| |
190 | 190 |
| |
191 |
| - | |
192 |
| - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
193 | 196 |
| |
194 | 197 |
| |
195 | 198 |
| |
|
0 commit comments
Comments
(0)