Commit d746021
committed
Add construct_array_builtin, deconstruct_array_builtin
There were many calls to construct_array() and deconstruct_array() for
built-in types, for example, when dealing with system catalog columns.
These all hardcoded the type attributes necessary to pass to these
functions.
To simplify this a bit, add construct_array_builtin(),
deconstruct_array_builtin() as wrappers that centralize this hardcoded
knowledge. This simplifies many call sites and reduces the amount of
hardcoded stuff that is spread around.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/2914356f-9e5f-8c59-2995-5997fc48bcba%40enterprisedb.com1 parent 7c2d6f8 commit d746021
File tree
51 files changed
+284
-298
lines changed- contrib
- hstore
- pageinspect
- pg_trgm
- pgcrypto
- src
- backend
- access/common
- catalog
- commands
- executor
- parser
- replication/logical
- statistics
- tsearch
- utils
- adt
- cache
- fmgr
- misc
- include/utils
- test/modules/test_rls_hooks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
51 files changed
+284
-298
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
| 121 | + | |
124 | 122 | | |
125 | 123 | | |
126 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
560 | 560 | | |
561 | 561 | | |
562 | 562 | | |
563 | | - | |
564 | | - | |
565 | | - | |
| 563 | + | |
566 | 564 | | |
567 | 565 | | |
568 | 566 | | |
| |||
583 | 581 | | |
584 | 582 | | |
585 | 583 | | |
586 | | - | |
587 | | - | |
588 | | - | |
| 584 | + | |
589 | 585 | | |
590 | 586 | | |
591 | 587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | | - | |
571 | | - | |
572 | | - | |
| 570 | + | |
573 | 571 | | |
574 | 572 | | |
575 | 573 | | |
| |||
606 | 604 | | |
607 | 605 | | |
608 | 606 | | |
609 | | - | |
610 | | - | |
611 | | - | |
| 607 | + | |
612 | 608 | | |
613 | 609 | | |
614 | 610 | | |
| |||
696 | 692 | | |
697 | 693 | | |
698 | 694 | | |
699 | | - | |
700 | | - | |
701 | | - | |
| 695 | + | |
702 | 696 | | |
703 | 697 | | |
704 | 698 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 83 | + | |
86 | 84 | | |
87 | 85 | | |
88 | 86 | | |
| |||
582 | 580 | | |
583 | 581 | | |
584 | 582 | | |
585 | | - | |
586 | | - | |
587 | | - | |
| 583 | + | |
588 | 584 | | |
589 | 585 | | |
590 | 586 | | |
| |||
719 | 715 | | |
720 | 716 | | |
721 | 717 | | |
722 | | - | |
723 | | - | |
| 718 | + | |
724 | 719 | | |
725 | 720 | | |
726 | 721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
| 428 | + | |
433 | 429 | | |
434 | 430 | | |
435 | 431 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
170 | | - | |
171 | | - | |
| 169 | + | |
172 | 170 | | |
173 | 171 | | |
174 | 172 | | |
| |||
273 | 271 | | |
274 | 272 | | |
275 | 273 | | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 274 | + | |
281 | 275 | | |
282 | 276 | | |
283 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
| 107 | + | |
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
| 567 | + | |
573 | 568 | | |
574 | 569 | | |
575 | 570 | | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
| 571 | + | |
582 | 572 | | |
583 | 573 | | |
584 | 574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
593 | | - | |
| 593 | + | |
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
615 | | - | |
| 615 | + | |
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
977 | 977 | | |
978 | 978 | | |
979 | 979 | | |
980 | | - | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | | - | |
| 980 | + | |
986 | 981 | | |
987 | 982 | | |
988 | 983 | | |
| |||
0 commit comments