Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SQL:
CREATE PROCEDURE insert_data(a integer, b integer)
LANGUAGE SQL
BEGIN ATOMIC
INSERT INTO tbl VALUES (a);
INSERT INTO tbl VALUES (b);
END;
ERROR for "CREATE PROCEDURE insert_data(a int, b int) LANGUAGE sql BEGIN ATOMIC INSERT INTO tbl VALUES (a); INSERT INTO tbl VALUES (b); END"
deparse: unpermitted node type in a_expr/b_expr: 231
parsetree: {"version":150001,"stmts":[{"stmt":{"CreateFunctionStmt":{"is_procedure":true,"funcname":[{"String":{"sval":"insert_data"}}],"parameters":[{"FunctionParameter":{"name":"a","argType":{"names":[{"String":{"sval":"pg_catalog"}},{"String":{"sval":"int4"}}],"typemod":-1,"location":31},"mode":"FUNC_PARAM_DEFAULT"}},{"FunctionParameter":{"name":"b","argType":{"names":[{"String":{"sval":"pg_catalog"}},{"String":{"sval":"int4"}}],"typemod":-1,"location":38},"mode":"FUNC_PARAM_DEFAULT"}}],"options":[{"DefElem":{"defname":"language","arg":{"String":{"sval":"sql"}},"defaction":"DEFELEM_UNSPEC","location":43}}],"sql_body":{"List":{"items":[{"List":{"items":[{"InsertStmt":{"relation":{"relname":"tbl","inh":true,"relpersistence":"p","location":81},"selectStmt":{"SelectStmt":{"valuesLists":[{"List":{"items":[{"ColumnRef":{"fields":[{"String":{"sval":"a"}}],"location":93}}]}}],"limitOption":"LIMIT_OPTION_DEFAULT","op":"SETOP_NONE"}},"override":"OVERRIDING_NOT_SET"}},{"InsertStmt":{"relation":{"relname":"tbl","inh":true,"relpersistence":"p","location":109},"selectStmt":{"SelectStmt":{"valuesLists":[{"List":{"items":[{"ColumnRef":{"fields":[{"String":{"sval":"b"}}],"location":121}}]}}],"limitOption":"LIMIT_OPTION_DEFAULT","op":"SETOP_NONE"}},"override":"OVERRIDING_NOT_SET"}}]}}]}}}}}]}