forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4b0c371
committed
Fix bugs in plpgsql's handling of CALL argument lists.
exec_stmt_call() tried to extract information out of a CALL statement'sargument list without using expand_function_arguments(), apparently inthe hope of saving a few nanoseconds by not processing defaultedarguments. It got that quite wrong though, leading to crashes withnamed arguments, as well as failure to enforce writability of theargument for a defaulted INOUT parameter. Fix and simplify the logicby using expand_function_arguments() before examining the list.Also, move the argument-examination to just after producing the CALLcommand's plan, before invoking the called procedure. This ensuresthat we'll track possible changes in the procedure's argument listcorrectly, and avoids a hazard of the plan cache being flushed whilethe procedure executes.Also fix assorted falsehoods and omissions in associated documentation.Per bug #15477 from Alexey Stepanov.Patch by me, with some help from Pavel Stehule. Back-patch to v11.Discussion:https://postgr.es/m/15477-86075b1d1d319e0a@postgresql.orgDiscussion:https://postgr.es/m/CAFj8pRA6UsujpTs9Sdwmk-R6yQykPx46wgjj+YZ7zxm4onrDyw@mail.gmail.com1 parent6f4e01c commit4b0c371
File tree
5 files changed
+297
-123
lines changed- doc/src/sgml
- ref
- src/pl/plpgsql/src
- expected
- sql
5 files changed
+297
-123
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
1867 | | - | |
1868 | | - | |
1869 | | - | |
1870 | | - | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
1871 | 1870 | | |
1872 | 1871 | | |
1873 | 1872 | | |
1874 | | - | |
1875 | | - | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
1876 | 1890 | | |
1877 | 1891 | | |
1878 | 1892 | | |
| |||
1882 | 1896 | | |
1883 | 1897 | | |
1884 | 1898 | | |
1885 | | - | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
1886 | 1906 | | |
1887 | 1907 | | |
1888 | 1908 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
84 | 91 | | |
85 | 92 | | |
86 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
| 231 | + | |
235 | 232 | | |
236 | 233 | | |
237 | | - | |
| 234 | + | |
238 | 235 | | |
239 | 236 | | |
240 | 237 | | |
241 | 238 | | |
242 | 239 | | |
243 | 240 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | 241 | | |
249 | 242 | | |
250 | 243 | | |
251 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
252 | 267 | | |
253 | 268 | | |
254 | 269 | | |
| |||
276 | 291 | | |
277 | 292 | | |
278 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
0 commit comments
Comments
(0)