Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser does not handle version 14 function syntax #2507

Open
davecramer opened this issue May 9, 2022 · 0 comments
Open

Parser does not handle version 14 function syntax #2507

davecramer opened this issue May 9, 2022 · 0 comments

Comments

@davecramer
Copy link
Member

New syntax for function definition allows functions to be defined without $$

CREATE OR REPLACE FUNCTION asterisks(n int)
  RETURNS SETOF text
  LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE
BEGIN ATOMIC
SELECT repeat('*', g) FROM generate_series (1, n) g; -- <-- Note this semicolon
END;

See #2506 for a reproducer

davecramer added a commit to davecramer/pgjdbc that referenced this issue Dec 21, 2022
davecramer added a commit that referenced this issue Dec 29, 2022
…2703)

* fix: Parser does not handle version 14 function syntax Issue #2507

* Change the logic to look for BEGIN ATOMIC instead of just ATOMIC

* document parser, refactor Brace to Parenthesis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant