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

Enrico Olivelli commented on CALCITE-2395:
------------------------------------------

[~julianhyde] [~michaelmior]

I am trying to find the best reference for SQL, honestly I never read that 
suite of standard documents.

 

I have found these documents, if you usually use some better reference will tel 
me, I will be happy to 'study'

[https://ronsavage.github.io/SQL/sql-92.bnf.html#xref-updatability%20clause]

[https://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt]

 

[~julianhyde]

It seems to me that 'FOR UPDATE OF" is about 'column names' and not "table 
names", I never used that syntax so I will have to study.

 

Given that I am able to represent such 'updatability clause' in Calcite SQL 
Parser..how do you expect it to be represented in RelNode AST model ? I expect 
it to be preserved somehow during Planner work.

I expect it to be preserved while reconstructing SQL for standard DBMS (for 
this part I am not an user of Calcite, I don't know this part at all)

 

I will start working on this an submit a patch, in order to start the 
discussion on some real example

 

> Support SELECT xxx FROM TABLE FOR UPDATE syntax
> -----------------------------------------------
>
>                 Key: CALCITE-2395
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2395
>             Project: Calcite
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 1.16.0
>            Reporter: Enrico Olivelli
>            Assignee: Julian Hyde
>            Priority: Major
>
> I am using Calcite SQL Parser and Volcano Planner.
> I need to support SQL syntax
> SELECT ... FROM table FOR UPDATE
>  
> see for instance PostGre docs
> [https://www.postgresql.org/docs/9.5/static/sql-select.html.]
>  
> I would like at least to support this syntax at SQL Parser level, the 'for 
> update' spec should be reported by the RelNode so that the system can take it 
> into account and perform explicit locking.
>  
> Linked downstream project issue:
> https://github.com/diennea/herddb/issues/228
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to