Commit 2c3f3f1
authored
PostgreSQL: COMMENT ON FUNCTION/PROCEDURE/AGGREGATE accepts argmode/argname/VARIADIC (#28)
Postgres permits argmode (IN/OUT/INOUT/VARIADIC) and argname tokens
ahead of each argument type in COMMENT ON FUNCTION / PROCEDURE /
AGGREGATE; they are ignored for identity resolution but appear in
real-world dumps and consumer schema files. The previous parser used
bare parse_data_type for the argument list, which hard-failed on those
shapes.
Switch the function-like arms of parse_comment to parse_function_arg
and project to data_type, since Statement::Comment.arguments stores a
plain Vec<DataType> and the modes/names are intentionally discarded
for identity matching.
Add tests covering argname, IN/OUT/INOUT, VARIADIC, and AGGREGATE.1 parent 4fe6b06 commit 2c3f3f1
2 files changed
Lines changed: 43 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
970 | 970 | | |
971 | 971 | | |
972 | 972 | | |
973 | | - | |
| 973 | + | |
| 974 | + | |
974 | 975 | | |
975 | | - | |
| 976 | + | |
976 | 977 | | |
977 | 978 | | |
978 | 979 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10677 | 10677 | | |
10678 | 10678 | | |
10679 | 10679 | | |
| 10680 | + | |
| 10681 | + | |
| 10682 | + | |
| 10683 | + | |
| 10684 | + | |
| 10685 | + | |
| 10686 | + | |
| 10687 | + | |
| 10688 | + | |
| 10689 | + | |
| 10690 | + | |
| 10691 | + | |
| 10692 | + | |
| 10693 | + | |
| 10694 | + | |
| 10695 | + | |
| 10696 | + | |
| 10697 | + | |
| 10698 | + | |
| 10699 | + | |
| 10700 | + | |
| 10701 | + | |
| 10702 | + | |
| 10703 | + | |
| 10704 | + | |
| 10705 | + | |
| 10706 | + | |
| 10707 | + | |
| 10708 | + | |
| 10709 | + | |
| 10710 | + | |
| 10711 | + | |
| 10712 | + | |
| 10713 | + | |
| 10714 | + | |
| 10715 | + | |
| 10716 | + | |
| 10717 | + | |
| 10718 | + | |
| 10719 | + | |
10680 | 10720 | | |
10681 | 10721 | | |
10682 | 10722 | | |
| |||
0 commit comments