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

`BEGIN' block never ends unless optional keywords are used #84

Closed
ieure opened this issue Apr 14, 2019 · 0 comments
Closed

`BEGIN' block never ends unless optional keywords are used #84

ieure opened this issue Apr 14, 2019 · 0 comments
Assignees

Comments

@ieure
Copy link

ieure commented Apr 14, 2019

The following code doesn't indent properly:

BEGIN;
  SELECT * FROM foo;
  COMMIT;

It works if you provide the TRANSACTION keyword:

BEGIN TRANSACTION;
SELECT * FROM foo;
COMMIT;

I'm not sure what the standard says, but my experience has been that BEGIN; is much more commonly used than BEGIN TRANSACTION;. PostgreSQL also allows BEGIN WORK, which exhibits the same problem.

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

2 participants