bug fixes
This commit is contained in:
parent
1ce5cc3928
commit
7fdee6f9f0
6 changed files with 12 additions and 14 deletions
|
@ -222,7 +222,6 @@ owned by none;
|
||||||
(as
|
(as
|
||||||
(identifier))
|
(identifier))
|
||||||
(sequence_increment
|
(sequence_increment
|
||||||
(ERROR)
|
|
||||||
(number))
|
(number))
|
||||||
(sequence_min
|
(sequence_min
|
||||||
(number))
|
(number))
|
||||||
|
|
|
@ -15,7 +15,7 @@ grant all on table foo to postgres;
|
||||||
================================================================================
|
================================================================================
|
||||||
all privileges
|
all privileges
|
||||||
================================================================================
|
================================================================================
|
||||||
grant all privileges on table foo.bar to postgres;
|
GRANT ALL PRIVILEGES ON TABLE FOO.BAR TO POSTGRES;
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
(source_file
|
(source_file
|
||||||
|
|
|
@ -11,7 +11,7 @@ end $$;
|
||||||
(block
|
(block
|
||||||
(dollar_quote)
|
(dollar_quote)
|
||||||
(body
|
(body
|
||||||
(ERROR))
|
(raise_statement))
|
||||||
(dollar_quote))))
|
(dollar_quote))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
|
@ -33,9 +33,7 @@ SELECT 1234, -25, TRUE, FALSE, NULL, *;
|
||||||
(select_item
|
(select_item
|
||||||
(number))
|
(number))
|
||||||
(select_item
|
(select_item
|
||||||
(op_expression
|
(number))
|
||||||
(minus)
|
|
||||||
(number)))
|
|
||||||
(select_item
|
(select_item
|
||||||
(true))
|
(true))
|
||||||
(select_item
|
(select_item
|
||||||
|
@ -89,9 +87,7 @@ SELECT -22 + - (5 + 1);
|
||||||
(select_statement
|
(select_statement
|
||||||
(select_item
|
(select_item
|
||||||
(op_expression
|
(op_expression
|
||||||
(op_expression
|
(number)
|
||||||
(minus)
|
|
||||||
(number))
|
|
||||||
(op_expression
|
(op_expression
|
||||||
(minus)
|
(minus)
|
||||||
(op_expression
|
(op_expression
|
||||||
|
|
|
@ -297,7 +297,7 @@ module.exports = grammar({
|
||||||
|
|
||||||
|
|
||||||
grant_privileges: $ => choice(
|
grant_privileges: $ => choice(
|
||||||
seq(kw("all"), optional("privileges")),
|
seq(kw("all"), optional(kw("privileges"))),
|
||||||
commaSep1($.identifier),
|
commaSep1($.identifier),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -437,9 +437,12 @@ module.exports = grammar({
|
||||||
|
|
||||||
// TODO(chrde): https://www.postgresql.org/docs/13/plpgsql-errors-and-messages.html
|
// TODO(chrde): https://www.postgresql.org/docs/13/plpgsql-errors-and-messages.html
|
||||||
raise_statement: $ => seq(
|
raise_statement: $ => seq(
|
||||||
kw("raise"), optional($.identifier),
|
kw("raise"),
|
||||||
|
optional(seq(
|
||||||
|
optional($.identifier),
|
||||||
$.string,
|
$.string,
|
||||||
optional(seq(",", commaSep($._value_expression)))
|
optional(seq(",", commaSep($._value_expression)))
|
||||||
|
)),
|
||||||
),
|
),
|
||||||
|
|
||||||
if_statement: $ => seq(
|
if_statement: $ => seq(
|
||||||
|
@ -810,7 +813,7 @@ module.exports = grammar({
|
||||||
null: $ => kw("null"),
|
null: $ => kw("null"),
|
||||||
star: $ => "*",
|
star: $ => "*",
|
||||||
any: $ => /.*/,
|
any: $ => /.*/,
|
||||||
number: $ => /\d+/,
|
number: $ => /-?\d+/,
|
||||||
identifier: $ => $._identifier,
|
identifier: $ => $._identifier,
|
||||||
_identifier: $ => /[a-zA-Z0-9_]+(\.?[a-zA-Z0-9_]+)*/,
|
_identifier: $ => /[a-zA-Z0-9_]+(\.?[a-zA-Z0-9_]+)*/,
|
||||||
// ^
|
// ^
|
||||||
|
|
Loading…
Reference in a new issue