tree-sitter-sql icon indicating copy to clipboard operation
tree-sitter-sql copied to clipboard

BEGIN ATOMIC (PostgreSQL 14+)

Open malthe opened this issue 1 year ago • 0 comments

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;

malthe avatar Feb 22 '24 09:02 malthe