tree-sitter-plpgsql/test/corpus/create_function/parameters.txt

98 lines
3 KiB
Text

================================================================================
empty
================================================================================
CREATE FUNCTION FOO () RETURNS void AS 'select' LANGUAGE sql;
--------------------------------------------------------------------------------
(source_file
(create_function_statement
(function_signature
(identifier)
(function_parameters))
(function_return
(identifier))
(string)
(identifier)))
================================================================================
with argument
================================================================================
CREATE FUNCTION FOO (_foo bar.baz) RETURNS void AS 'select' LANGUAGE sql;
--------------------------------------------------------------------------------
(source_file
(create_function_statement
(function_signature
(identifier)
(function_parameters
(var_declaration
(identifier)
(identifier))))
(function_return
(identifier))
(string)
(identifier)))
================================================================================
default value
================================================================================
CREATE FUNCTION FOO (_foo bar.baz default '42') RETURNS void AS 'select' LANGUAGE sql;
--------------------------------------------------------------------------------
(source_file
(create_function_statement
(function_signature
(identifier)
(function_parameters
(var_declaration
(identifier)
(identifier))
(string)))
(function_return
(identifier))
(string)
(identifier)))
================================================================================
with arguments
================================================================================
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))))
(function_return
(identifier))
(string)
(identifier)))
================================================================================
arrays
================================================================================
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))))
(function_return
(identifier))
(string)
(identifier)))