weibiansanjue opened a new issue, #24862: URL: https://github.com/apache/shardingsphere/issues/24862
## Question **For English only**, other languages will not accept. Before asking a question, make sure you have: - Googled your question. - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues). - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview). Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will **close it**. ---- - env - shardingsphere-proxy 5.3.0 / 5.3.1 - postgresql 9.6.4 - client : dbeaver 23.0.0 - Use ```text clent --sql--> shardingsphere-proxy ----> postgresql ``` - mini case - `select public.int4range(400, 500, '[]');` - ```text ERROR: You have an error in your SQL syntax: select public.int4range(400, 500, '[]') , no viable alternative at input 'selectpublic.int4range' at line 1, position 14, near [@3,14:22='int4range',<219>,1:14] ``` - Other [range type](https://www.postgresql.org/docs/9.6/rangetypes.html) construcor function is same too.(int8range, numrange, tsrange, tstzrange, daterange) - other function don't wrapped in quotes is success - solution - range type construcor function wrapped in quotes is success, like ```sql select "int4range"(400, 500, '[]'); select "tsrange"('[2023-01-01 14:30, 2023-03-01 15:30]'); ``` - **question** - **Why does this happen that range type constructor function?** - **What function needs wrapped in quotes? or range type constructor function have to?** - suppose - Each range type has a constructor function with the same name as the range type, range type name is keyword in ANTLR4 file,mybe name conflict or ambiguity - other test - data type, no quotes success ```sql CREATE TABLE reservation ( during tsrange ); INSERT INTO reservation VALUES ('[2010-01-01 11:30, 2010-01-01 15:00)'); ``` - defining new range types, success ```sql CREATE TYPE floatrange AS RANGE ( subtype = float8, subtype_diff = float8mi ); SELECT '[1.234, 5.678]'::floatrange; -- no quotes ``` - Thanks a lot. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
