You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Hai Liu (Jira)" <ji...@apache.org> on 2021/09/30 10:23:00 UTC

[jira] [Assigned] (IOTDB-1620) Support backtick (`) character to quote identifiers

     [ https://issues.apache.org/jira/browse/IOTDB-1620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hai Liu reassigned IOTDB-1620:
------------------------------

    Assignee: Steve Yurong Su  (was: Minghui Liu)

> Support backtick (`) character  to quote identifiers 
> -----------------------------------------------------
>
>                 Key: IOTDB-1620
>                 URL: https://issues.apache.org/jira/browse/IOTDB-1620
>             Project: Apache IoTDB
>          Issue Type: New Feature
>            Reporter: Minghui Liu
>            Assignee: Steve Yurong Su
>            Priority: Major
>             Fix For: master branch, 0.12.2-SNAPSHOT
>
>   Original Estimate: 16h
>  Remaining Estimate: 16h
>
> Certain objects within IoTDB, including storage group, device, timeseries, schema template, alias, function, trigger and other object names are known as identifiers. An identifier may be quoted or unquoted. If an identifier contains special characters or is a reserved word, you _must_ quote it whenever you refer to it.
>  
> The identifier quote character is the backtick ({{`}}):
> {code:java}
> IoTDB> SET STORAGE GROUP TO root.`storage` 
> Msg: The statement is executed successfully. 
> IoTDB> SHOW STORAGE GROUP 
> +-------------+ 
> |storage group| 
> +-------------+ 
> | root.storage| 
> +-------------+ 
> Total line number = 1 
> It costs 0.050s
> {code}
>  
> {code:java}
> IoTDB> INSERT INTO root.sg.`select`(TIMESTAMP,`s(0)`) VALUES(1,1) 
> Msg: The statement is executed successfully. 
> IoTDB> SELECT `s(0)` FROM root.sg.`select` 
> +-----------------------------+-------------------+ 
> |                         Time|root.sg.select.s(0)| 
> +-----------------------------+-------------------+ 
> |1970-01-01T08:00:00.001+08:00|                1.0| 
> +-----------------------------+-------------------+ 
> Total line number = 1 
> It costs 0.142s
> {code}
>  
> Identifier quote characters can be included within an identifier if you quote the identifier. If the character to be included within the identifier is the same as that used to quote the identifier itself, then you need to double the character. The following statement creates a storage group named {{root.a`b}} :
> {code:java}
> IoTDB> SET STORAGE GROUP TO root.`a``b` 
> Msg: The statement is executed successfully. 
> IoTDB> SHOW STORAGE GROUP 
> +-------------+ 
> |storage group| 
> +-------------+ 
> |     root.a`b| 
> +-------------+ 
> Total line number = 1 
> It costs 0.050s
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)