tree-sitter-sql
tree-sitter-sql copied to clipboard
BEGIN ATOMIC (PostgreSQL 14+)
In PostgreSQL 14+ a new language mode is available to define a function:
- https://www.postgresql.org/docs/14/sql-createfunction.html
Explanation:
Allow SQL-language functions and procedures to use SQL-standard function bodies
Here's an example which currently fails to parse:
CREATE FUNCTION test (integer)
RETURNS int
LANGUAGE SQL
BEGIN ATOMIC
SELECT $1;
END;