forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd939cb2
committed
Generalize handling of nullable pg_attribute columns in DDL
DDL code uses tuple descriptors to pass around pg_attribute valuesduring table and index creation. But tuple descriptors don't includethe variable-length/nullable columns of pg_attribute, so they have tobe handled separately. Right now, the attoptions field is handled ina one-off way with a separate argument passed toInsertPgAttributeTuples(). The other affected fields of pg_attributeare right now not needed at relation creation time.The goal of this patch is to generalize this to allow handlingadditional variable-length/nullable columns of pg_attribute in asimilar manner. For that, create a new structFormExtraData_pg_attribute, which is to be passed around in parallelto the tuple descriptor and optionally supplies the additionalcolumns. Right now, this struct only contains one field forattoptions, so no functionality is actually changed by this.Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com>Discussion:https://www.postgresql.org/message-id/flat/4da8d211-d54d-44b9-9847-f2a9f1184c76@eisentraut.org1 parent012460e commitd939cb2
File tree
5 files changed
+44
-9
lines changed- src
- backend/catalog
- include/catalog
- tools/pgindent
5 files changed
+44
-9
lines changedLines changed: 14 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
684 | 684 |
| |
685 | 685 |
| |
686 | 686 |
| |
687 |
| - | |
688 |
| - | |
689 |
| - | |
690 |
| - | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
691 | 692 |
| |
692 | 693 |
| |
693 | 694 |
| |
| |||
701 | 702 |
| |
702 | 703 |
| |
703 | 704 |
| |
704 |
| - | |
| 705 | + | |
705 | 706 |
| |
706 | 707 |
| |
707 | 708 |
| |
| |||
723 | 724 |
| |
724 | 725 |
| |
725 | 726 |
| |
| 727 | + | |
726 | 728 |
| |
727 | 729 |
| |
728 | 730 |
| |
| |||
754 | 756 |
| |
755 | 757 |
| |
756 | 758 |
| |
757 |
| - | |
758 |
| - | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
759 | 764 |
| |
| 765 | + | |
760 | 766 |
| |
| 767 | + | |
761 | 768 |
| |
762 | 769 |
| |
763 | 770 |
| |
|
Lines changed: 15 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
512 | 512 |
| |
513 | 513 |
| |
514 | 514 |
| |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
515 | 529 |
| |
516 | 530 |
| |
517 | 531 |
| |
| |||
525 | 539 |
| |
526 | 540 |
| |
527 | 541 |
| |
528 |
| - | |
| 542 | + | |
529 | 543 |
| |
530 | 544 |
| |
531 | 545 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
101 |
| - | |
| 101 | + | |
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
208 | 208 |
| |
209 | 209 |
| |
210 | 210 |
| |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
211 | 224 |
| |
212 | 225 |
| |
213 | 226 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
850 | 850 |
| |
851 | 851 |
| |
852 | 852 |
| |
| 853 | + | |
853 | 854 |
| |
854 | 855 |
| |
855 | 856 |
| |
|
0 commit comments
Comments
(0)