forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit23c6eb0
committed
Remove create_singleton_array(), hard-coding the case in its sole caller.
create_singleton_array() was not really as useful as we perhaps thoughtwhen we added it. It had never accreted more than one call site, and isonly saving a dozen lines of code at that one, which is considerably lessbulk than the function itself. Moreover, because of its insistence onusing the caller's fn_extra cache space, it's arguably a coding hazard.text_to_array_internal() does not currently use fn_extra in any other way,but if it did it would be subtly broken, since the conflicting fn_extrauses could be needed within a single query, in the seldom-tested case thatthe field separator varies during the query. The same objection seemslikely to apply to any other potential caller.The replacement code is a bit uglier, because it hardwires knowledge ofthe storage parameters of type TEXT, but it's not like we haven't gotdozens or hundreds of other places that do the same. Uglier seems likea good tradeoff for smaller, faster, and safer.Per discussion with Neha Khatri.Discussion:https://postgr.es/m/CAFO0U+_fS5SRhzq6uPG+4fbERhoA9N2+nPrtvaC9mmeWivxbsA@mail.gmail.com1 parent9209e07 commit23c6eb0
File tree
3 files changed
+14
-85
lines changed- src
- backend/utils/adt
- include/utils
3 files changed
+14
-85
lines changedLines changed: 0 additions & 73 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
454 | 454 |
| |
455 | 455 |
| |
456 | 456 |
| |
457 |
| - | |
458 |
| - | |
459 |
| - | |
460 |
| - | |
461 |
| - | |
462 |
| - | |
463 |
| - | |
464 |
| - | |
465 |
| - | |
466 |
| - | |
467 |
| - | |
468 |
| - | |
469 |
| - | |
470 |
| - | |
471 |
| - | |
472 |
| - | |
473 |
| - | |
474 |
| - | |
475 |
| - | |
476 |
| - | |
477 |
| - | |
478 |
| - | |
479 |
| - | |
480 |
| - | |
481 |
| - | |
482 |
| - | |
483 |
| - | |
484 |
| - | |
485 |
| - | |
486 |
| - | |
487 |
| - | |
488 |
| - | |
489 |
| - | |
490 |
| - | |
491 |
| - | |
492 |
| - | |
493 |
| - | |
494 |
| - | |
495 |
| - | |
496 |
| - | |
497 |
| - | |
498 |
| - | |
499 |
| - | |
500 |
| - | |
501 |
| - | |
502 |
| - | |
503 |
| - | |
504 |
| - | |
505 |
| - | |
506 |
| - | |
507 |
| - | |
508 |
| - | |
509 |
| - | |
510 |
| - | |
511 |
| - | |
512 |
| - | |
513 |
| - | |
514 |
| - | |
515 |
| - | |
516 |
| - | |
517 |
| - | |
518 |
| - | |
519 |
| - | |
520 |
| - | |
521 |
| - | |
522 |
| - | |
523 |
| - | |
524 |
| - | |
525 |
| - | |
526 |
| - | |
527 |
| - | |
528 |
| - | |
529 |
| - | |
530 | 457 |
| |
531 | 458 |
| |
532 | 459 |
| |
|
Lines changed: 14 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4218 | 4218 |
| |
4219 | 4219 |
| |
4220 | 4220 |
| |
| 4221 | + | |
| 4222 | + | |
| 4223 | + | |
| 4224 | + | |
| 4225 | + | |
4221 | 4226 |
| |
4222 | 4227 |
| |
4223 | 4228 |
| |
4224 |
| - | |
4225 |
| - | |
4226 |
| - | |
| 4229 | + | |
| 4230 | + | |
| 4231 | + | |
| 4232 | + | |
| 4233 | + | |
| 4234 | + | |
| 4235 | + | |
| 4236 | + | |
| 4237 | + | |
4227 | 4238 |
| |
4228 | 4239 |
| |
4229 | 4240 |
| |
|
Lines changed: 0 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
443 | 443 |
| |
444 | 444 |
| |
445 | 445 |
| |
446 |
| - | |
447 |
| - | |
448 |
| - | |
449 |
| - | |
450 |
| - | |
451 |
| - | |
452 |
| - | |
453 |
| - | |
454 |
| - | |
455 | 446 |
|
0 commit comments
Comments
(0)