Stamatis Zampetakis created CALCITE-4690:
--------------------------------------------

             Summary: Error when when executing query with CHARACTER SET in 
Redshift
                 Key: CALCITE-4690
                 URL: https://issues.apache.org/jira/browse/CALCITE-4690
             Project: Calcite
          Issue Type: Bug
          Components: core, jdbc-adapter
    Affects Versions: 1.27.0
            Reporter: Stamatis Zampetakis
            Assignee: Stamatis Zampetakis
             Fix For: 1.28.0


Redshift does not support character sets in [data 
types|https://docs.aws.amazon.com/redshift/latest/dg/r_Character_types.html]. 
In fact it seems that it only supports 
[UTF-8|https://docs.aws.amazon.com/redshift/latest/dg/multi-byte-character-load-errors.html].
 As a result any appearance of the CHARACTER SET clause in a query leads to 
errors.

{code:sql}
select cast (col1 as varchar(3) CHARACTER SET "ISO-8859-1") from test;
{code}

{noformat}
Error: ERROR: type "pg_catalog.varchar_iso-8859-1" does not exist 
(state=42704,code=0)
{noformat}

Even if {{CHARACTER SET}} clause is not explicitly present in the original 
query it might appear in the generated SQL via {{RelToSqlConverter}} due to 
casts or other operations.



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

Reply via email to