forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite56bce5
committed
Reconsider the handling of procedure OUT parameters.
Commit2453ea1 redefined pg_proc.proargtypes to include the types ofOUT parameters, for procedures only. While that had some advantagesfor implementing the SQL-spec behavior of DROP PROCEDURE, it was prettydisastrous from a number of other perspectives. Notably, since theprimary key of pg_proc is name + proargtypes, this made it possible tohave multiple procedures with identical names + input arguments anddiffering output argument types. That would make it impossible to callany one of the procedures by writing just NULL (or "?", or any otherdata-type-free notation) for the output argument(s). The change alsoseems likely to cause grave confusion for client applications thatexamine pg_proc and expect the traditional definition of proargtypes.Hence, revert the definition of proargtypes to what it was, andundo a number of complications that had been added to support that.To support the SQL-spec behavior of DROP PROCEDURE, when there areno argmode markers in the command's parameter list, we perform thelookup both ways (that is, matching against both proargtypes andproallargtypes), succeeding if we get just one unique match.In principle this could result in ambiguous-function failuresthat would not happen when using only one of the two rules.However, overloading of procedure names is thought to be a prettyrare usage, so this shouldn't cause many problems in practice.Postgres-specific code such as pg_dump can defend against anypossibility of such failures by being careful to specify argmodesfor all procedure arguments.This also fixes a few other bugs in the area of CALL statementswith named parameters, and improves the documentation a little.catversion bump forced because the representation of procedureswith OUT arguments changes.Discussion:https://postgr.es/m/3742981.1621533210@sss.pgh.pa.us1 parent3a09d75 commite56bce5
File tree
44 files changed
+1069
-392
lines changed- doc/src/sgml
- ref
- src
- backend
- catalog
- commands
- executor
- nodes
- optimizer/util
- parser
- utils
- adt
- fmgr
- bin/pg_dump/t
- include
- catalog
- nodes
- optimizer
- parser
- pl
- plpgsql/src
- expected
- sql
- plpython
- expected
- sql
- tcl
- expected
- sql
- test/regress
- expected
- sql
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
44 files changed
+1069
-392
lines changedLines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5905 | 5905 |
| |
5906 | 5906 |
| |
5907 | 5907 |
| |
5908 |
| - | |
5909 |
| - | |
5910 |
| - | |
| 5908 | + | |
| 5909 | + | |
5911 | 5910 |
| |
5912 | 5911 |
| |
5913 | 5912 |
| |
|
Lines changed: 12 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
480 | 480 |
| |
481 | 481 |
| |
482 | 482 |
| |
483 |
| - | |
| 483 | + | |
484 | 484 |
| |
485 | 485 |
| |
486 | 486 |
| |
| |||
523 | 523 |
| |
524 | 524 |
| |
525 | 525 |
| |
526 |
| - | |
| 526 | + | |
| 527 | + | |
527 | 528 |
| |
528 | 529 |
| |
529 | 530 |
| |
530 | 531 |
| |
531 | 532 |
| |
532 | 533 |
| |
533 |
| - | |
534 |
| - | |
535 |
| - | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
536 | 540 |
| |
537 | 541 |
| |
538 | 542 |
| |
| |||
2030 | 2034 |
| |
2031 | 2035 |
| |
2032 | 2036 |
| |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
2033 | 2040 |
| |
2034 | 2041 |
| |
2035 | 2042 |
| |
|
Lines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
212 | 212 |
| |
213 | 213 |
| |
214 | 214 |
| |
215 |
| - | |
216 |
| - | |
217 |
| - | |
218 |
| - | |
219 |
| - | |
220 |
| - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
221 | 220 |
| |
222 | 221 |
| |
223 | 222 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
96 | 96 |
| |
97 | 97 |
| |
98 | 98 |
| |
99 |
| - | |
| 99 | + | |
100 | 100 |
| |
101 | 101 |
| |
102 | 102 |
| |
| |||
108 | 108 |
| |
109 | 109 |
| |
110 | 110 |
| |
| 111 | + | |
| 112 | + | |
111 | 113 |
| |
112 | 114 |
| |
113 | 115 |
| |
|
Lines changed: 22 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
58 |
| - | |
59 |
| - | |
60 |
| - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
61 | 76 |
| |
62 | 77 |
| |
63 | 78 |
| |
| |||
101 | 116 |
| |
102 | 117 |
| |
103 | 118 |
| |
104 |
| - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
105 | 123 |
| |
106 | 124 |
| |
107 | 125 |
| |
|
Lines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
176 | 176 |
| |
177 | 177 |
| |
178 | 178 |
| |
179 |
| - | |
180 |
| - | |
181 |
| - | |
182 |
| - | |
183 |
| - | |
184 |
| - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
185 | 184 |
| |
186 | 185 |
| |
187 | 186 |
| |
|
Lines changed: 81 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 |
| - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 |
| - | |
60 |
| - | |
| 59 | + | |
61 | 60 |
| |
62 | 61 |
| |
63 | 62 |
| |
| |||
69 | 68 |
| |
70 | 69 |
| |
71 | 70 |
| |
72 |
| - | |
| 71 | + | |
73 | 72 |
| |
74 | 73 |
| |
75 | 74 |
| |
| |||
82 | 81 |
| |
83 | 82 |
| |
84 | 83 |
| |
85 |
| - | |
| 84 | + | |
86 | 85 |
| |
87 | 86 |
| |
88 | 87 |
| |
| |||
94 | 93 |
| |
95 | 94 |
| |
96 | 95 |
| |
| 96 | + | |
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
124 | 170 |
| |
125 | 171 |
| |
126 | 172 |
| |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
127 | 187 |
| |
128 |
| - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
129 | 193 |
| |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
130 | 199 |
| |
131 | 200 |
| |
132 | 201 |
| |
| |||
140 | 209 |
| |
141 | 210 |
| |
142 | 211 |
| |
143 |
| - | |
| 212 | + | |
144 | 213 |
| |
145 | 214 |
| |
146 |
| - | |
| 215 | + | |
| 216 | + | |
147 | 217 |
| |
148 | 218 |
| |
149 | 219 |
| |
|
Lines changed: 36 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 |
| - | |
34 |
| - | |
35 |
| - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
42 | 71 |
| |
43 | 72 |
| |
44 | 73 |
| |
| |||
64 | 93 |
| |
65 | 94 |
| |
66 | 95 |
| |
67 |
| - | |
| 96 | + | |
68 | 97 |
| |
69 | 98 |
| |
70 |
| - | |
| 99 | + | |
| 100 | + | |
71 | 101 |
| |
72 | 102 |
| |
73 |
| - | |
| 103 | + | |
74 | 104 |
| |
75 | 105 |
| |
76 | 106 |
| |
|
Lines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
126 | 126 |
| |
127 | 127 |
| |
128 | 128 |
| |
129 |
| - | |
130 |
| - | |
131 |
| - | |
132 |
| - | |
133 |
| - | |
134 |
| - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
135 | 134 |
| |
136 | 135 |
| |
137 | 136 |
| |
|
0 commit comments
Comments
(0)