tree-sitter-plpgsql/corpus/create_function/errors.txt

79 lines
2.4 KiB
Text
Raw Normal View History

2021-08-28 13:46:32 +03:00
================================================================================
wrong - trailing comma (1)
================================================================================
CREATE FUNCTION FOO (foo bar,) RETURNS void AS 'select' LANGUAGE sql;
--------------------------------------------------------------------------------
(source_file
(create_function_statement
(function_signature
(identifier)
(function_parameters
(var_declaration
(identifier)
(identifier))
(ERROR)))
(function_return
(identifier))
(string)
(identifier)))
================================================================================
wrong - trailing comma (2)
================================================================================
CREATE FUNCTION FOO (foo bar, foo bar,) RETURNS void AS 'select' LANGUAGE sql;
--------------------------------------------------------------------------------
(source_file
(create_function_statement
(function_signature
(identifier)
(function_parameters
(var_declaration
(identifier)
(identifier))
(var_declaration
(identifier)
(identifier))
(ERROR)))
(function_return
(identifier))
(string)
(identifier)))
================================================================================
wrong - missing type
================================================================================
CREATE FUNCTION FOO (foo,) RETURNS void AS 'select' LANGUAGE sql;
--------------------------------------------------------------------------------
(source_file
(create_function_statement
(function_signature
(identifier)
(function_parameters
(ERROR
(identifier))))
(function_return
(identifier))
(string)
(identifier)))
================================================================================
wrong - many volatilities
================================================================================
CREATE FUNCTION FOO () RETURNS void AS 'select' LANGUAGE sql STABLE VOLATILE;
--------------------------------------------------------------------------------
(source_file
(create_function_statement
(function_signature
(identifier)
(function_parameters))
(function_return
(identifier))
(string)
(identifier)
(function_volatility))
(ERROR))