get diagnostics
This commit is contained in:
parent
7fdee6f9f0
commit
fa4317ba96
2 changed files with 28 additions and 0 deletions
25
corpus/plpgsql/get_diagnostics_statement.txt
Normal file
25
corpus/plpgsql/get_diagnostics_statement.txt
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
================================================================================
|
||||||
|
get diagnostics
|
||||||
|
================================================================================
|
||||||
|
DO $$
|
||||||
|
BEGIN
|
||||||
|
get current diagnostics foo = ROW_COUNT;
|
||||||
|
get diagnostics bar := ROW_COUNT;
|
||||||
|
END
|
||||||
|
$$;
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
(source_file
|
||||||
|
(do_block
|
||||||
|
(block
|
||||||
|
(dollar_quote)
|
||||||
|
(body
|
||||||
|
(get_diagnostics_statement
|
||||||
|
(assign_statement
|
||||||
|
(identifier)
|
||||||
|
(identifier)))
|
||||||
|
(get_diagnostics_statement
|
||||||
|
(assign_statement
|
||||||
|
(identifier)
|
||||||
|
(identifier))))
|
||||||
|
(dollar_quote))))
|
|
@ -410,6 +410,7 @@ module.exports = grammar({
|
||||||
choice(
|
choice(
|
||||||
$._statement,
|
$._statement,
|
||||||
$.assign_statement,
|
$.assign_statement,
|
||||||
|
$.get_diagnostics_statement,
|
||||||
$.return_statement,
|
$.return_statement,
|
||||||
$.raise_statement,
|
$.raise_statement,
|
||||||
$.if_statement,
|
$.if_statement,
|
||||||
|
@ -420,6 +421,8 @@ module.exports = grammar({
|
||||||
";",
|
";",
|
||||||
),
|
),
|
||||||
|
|
||||||
|
get_diagnostics_statement: $ => seq(kw("get"), optional(kw("current")), kw("diagnostics"), $.assign_statement),
|
||||||
|
|
||||||
for_statement: $ => seq(
|
for_statement: $ => seq(
|
||||||
kw("for"), commaSep1($.identifier), kw("in"), choice(
|
kw("for"), commaSep1($.identifier), kw("in"), choice(
|
||||||
seq(
|
seq(
|
||||||
|
|
Loading…
Reference in a new issue