tree-sitter-plpgsql/corpus/create_function/parameters.txt
Christian De la Hoz 6303f6c3d8 getting into shape
2021-08-28 12:46:32 +02:00

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)))