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

Dmitry Sysolyatin updated CALCITE-5668:
---------------------------------------
    Description: 
According PostgreSQL documentation [1][2]:
??SQL identifiers and key words must begin with a letter (a-z, but also letters 
with diacritical marks and non-Latin letters) or an underscore (_). Subsequent 
characters in an identifier or key word can be letters, underscores, digits 
(0-9), or dollar signs ($).??

Letters with diacritical marks and non-Latin letters are extended ascii letters 
(character code 128-255 or in octal \200-\377)[3].



[1] 
[https://www.postgresql.org/docs/15/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS]
[2] [https://github.com/postgres/postgres/blob/master/src/backend/parser/scan.l]
[3][https://learn.microsoft.com/zh-cn/office/vba/language/reference/user-interface-help/character-set-128255]

  was:
According PostgreSQL documentation [1]:
??SQL identifiers and key words must begin with a letter (a-z, but also letters 
with diacritical marks and non-Latin letters) or an underscore (_). Subsequent 
characters in an identifier or key word can be letters, underscores, digits 
(0-9), or dollar signs ($).??

To implement it, I suggest using the same approach as in CALCITE-4246.

[1] 
https://www.postgresql.org/docs/15/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS


> When parsing SQL in PostgreSQL dialect, allow unquoted table names to contain 
> dollar sign, letters with diacritical marks and non-Latin letters
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-5668
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5668
>             Project: Calcite
>          Issue Type: Bug
>          Components: babel
>    Affects Versions: 1.34.0
>            Reporter: Dmitry Sysolyatin
>            Priority: Major
>
> According PostgreSQL documentation [1][2]:
> ??SQL identifiers and key words must begin with a letter (a-z, but also 
> letters with diacritical marks and non-Latin letters) or an underscore (_). 
> Subsequent characters in an identifier or key word can be letters, 
> underscores, digits (0-9), or dollar signs ($).??
> Letters with diacritical marks and non-Latin letters are extended ascii 
> letters (character code 128-255 or in octal \200-\377)[3].
> [1] 
> [https://www.postgresql.org/docs/15/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS]
> [2] 
> [https://github.com/postgres/postgres/blob/master/src/backend/parser/scan.l]
> [3][https://learn.microsoft.com/zh-cn/office/vba/language/reference/user-interface-help/character-set-128255]



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

Reply via email to