forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd20d8fb
committed
Do not output actual value of location fields in node serialization by default
This changes nodeToString() to not output the actual value of locationfields in nodes, but instead it writes -1. This mirrors the fact thatstringToNode() also does not read location field values but alwaysstores -1.For most uses of nodeToString(), which is to store nodes in catalogfields, this is more useful. We don't store original query texts incatalogs, so any lingering query location values are not meaningful.For debugging purposes, there is a new nodeToStringWithLocations(),which mirrors the existing stringToNodeWithLocations(). This is usedfor WRITE_READ_PARSE_PLAN_TREES and nodes/print.c functions, whichcovers all the debugging uses.Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/CAEze2WgrCiR3JZmWyB0YTc8HV7ewRdx13j0CqD6mVkYAW+SFGQ@mail.gmail.com1 parent6ae701b commitd20d8fb
File tree
4 files changed
+41
-9
lines changed- src
- backend
- nodes
- tcop
- include/nodes
4 files changed
+41
-9
lines changedLines changed: 34 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 |
| |
29 | 32 |
| |
30 | 33 |
| |
| |||
88 | 91 |
| |
89 | 92 |
| |
90 | 93 |
| |
91 |
| - | |
| 94 | + | |
92 | 95 |
| |
93 | 96 |
| |
94 | 97 |
| |
| |||
757 | 760 |
| |
758 | 761 |
| |
759 | 762 |
| |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
760 | 768 |
| |
761 |
| - | |
762 |
| - | |
| 769 | + | |
| 770 | + | |
763 | 771 |
| |
764 | 772 |
| |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
765 | 777 |
| |
766 | 778 |
| |
767 | 779 |
| |
768 | 780 |
| |
| 781 | + | |
| 782 | + | |
| 783 | + | |
769 | 784 |
| |
770 | 785 |
| |
771 | 786 |
| |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
772 | 803 |
| |
773 | 804 |
| |
774 | 805 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 |
| - | |
| 41 | + | |
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 |
| - | |
| 59 | + | |
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
| |||
74 | 74 |
| |
75 | 75 |
| |
76 | 76 |
| |
77 |
| - | |
| 77 | + | |
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
641 | 641 |
| |
642 | 642 |
| |
643 | 643 |
| |
644 |
| - | |
| 644 | + | |
645 | 645 |
| |
646 | 646 |
| |
647 | 647 |
| |
| |||
849 | 849 |
| |
850 | 850 |
| |
851 | 851 |
| |
852 |
| - | |
| 852 | + | |
853 | 853 |
| |
854 | 854 |
| |
855 | 855 |
| |
| |||
931 | 931 |
| |
932 | 932 |
| |
933 | 933 |
| |
934 |
| - | |
| 934 | + | |
935 | 935 |
| |
936 | 936 |
| |
937 | 937 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
| 198 | + | |
198 | 199 |
| |
199 | 200 |
| |
200 | 201 |
| |
|
0 commit comments
Comments
(0)