Commit f036d86
committed
Fix postgresql parsing of existing function defaults
The column pg_proc.proargdefaults when converted with pg_get_expr returns a comma separated string of default values. This list of values then needs to be aligned to the right most input argument. To avoid this complex rearangement, and avoid any potential edge cases where ',' might be in the default value, the function pg_get_function_arg_default is used to check for a default for each argument.1 parent d8ab535 commit f036d86
2 files changed
Lines changed: 68 additions & 6 deletions
File tree
- src/sqlalchemy_declarative_extensions/dialects/postgresql
- tests/dialect/postgresql
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
321 | 339 | | |
322 | 340 | | |
323 | 341 | | |
| |||
334 | 352 | | |
335 | 353 | | |
336 | 354 | | |
337 | | - | |
338 | | - | |
339 | | - | |
| 355 | + | |
340 | 356 | | |
341 | 357 | | |
342 | 358 | | |
| |||
369 | 385 | | |
370 | 386 | | |
371 | 387 | | |
372 | | - | |
373 | | - | |
374 | | - | |
| 388 | + | |
375 | 389 | | |
376 | 390 | | |
377 | 391 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
0 commit comments