[ 
https://issues.apache.org/jira/browse/CALCITE-5403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17705115#comment-17705115
 ] 

Dmitry Sysolyatin commented on CALCITE-5403:
--------------------------------------------

[~julianhyde], I will try to improve the code. However, I suggest making these 
improvements within the scope of another task, as the PR has already been 
merged. Tomorrow, I will create a task to implement 
https://www.postgresql.org/docs/current/sql-set-transaction.html. I suggest 
addressing the code improvements as part of that task.

> Babel parser should parse PostgreSQL's SET, RESET, BEGIN, SHOW, ROLLBACK, 
> COMMIT commands
> -----------------------------------------------------------------------------------------
>
>                 Key: CALCITE-5403
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5403
>             Project: Calcite
>          Issue Type: Bug
>          Components: babel
>    Affects Versions: 1.34.0
>            Reporter: Dmitry Sysolyatin
>            Assignee: Dmitry Sysolyatin
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.35.0
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Babel parser can not parse BEGIN [1], SHOW [2], ROLLBACK [3], COMMIT [4] 
> commands at the moment.
> It can parse SET [5] and RESET [6], but not completely. For instance, it can 
> not parse the following statement:
> {code:java}
> SET SCHEMA public,public,"$user"
> {code}
> The syntax for these commands is as follows:
>  * BEGIN [1]:
> {code:java}
> BEGIN [ WORK | TRANSACTION ] [ transaction_mode [, ...] ] 
> where transaction_mode is one of: ISOLATION LEVEL { SERIALIZABLE | REPEATABLE 
> READ | READ COMMITTED | READ UNCOMMITTED } READ WRITE | READ ONLY [ NOT ] 
> DEFERRABLE
> {code}
>  * SHOW [2]:
> {code:java}
> SHOW (<TRANSACTION ISOLATION LEVEL> | <string literal>)
> {code}
>  * ROLLBACK [3]:
> {code:java}
> ROLLBACK [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
> {code}
>  * COMMIT [4]:
> {code:java}
> COMMIT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
> {code}
>  * SET [5]
> {code:java}
> SET [ SESSION | LOCAL ] configuration_parameter { TO | = } { value | 'value' 
> | DEFAULT }
> SET [ SESSION | LOCAL ] TIME ZONE { value | 'value' | LOCAL | DEFAULT }
> SET [ SESSION | LOCAL ]  { SCHEMA | SEED | NAMES } value
> Values can be specified as string constants, identifiers, numbers, or 
> comma-separated lists of these
> {code}
>  * RESET [6]
> {code:java}
> RESET <parameter>;
> {code}
> [1] [https://www.postgresql.org/docs/current/sql-begin.html]
> [2] [https://www.postgresql.org/docs/current/sql-show.html]
> [3] [https://www.postgresql.org/docs/current/sql-rollback.html]
> [4] [https://www.postgresql.org/docs/current/sql-commit.html]
> [5] [https://www.postgresql.org/docs/current/sql-set.html]
> [6] [https://www.postgresql.org/docs/current/sql-reset.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to