Description
Currently this fails:
SQL> set search_path to public;
SQL> select cast('abc' as varchar(50) character set utf8) from system.rdb$database;
Statement failed, SQLSTATE = HY004
Dynamic SQL Error
-SQL error code = -204
-Data type unknown
-CHARACTER SET "PUBLIC"."UTF8" is not defined
And this really should never happen, no matter what the search path is.
Following the rules of the SQL standard of section 4.3.1 and section 5.4 syntax rules 12 and 13a, unqualified character sets and collations should always lookup the system character sets and collations (which in the standard live in INFORMATION_SCHEMA
, and for us in SYSTEM
). We can relax this a bit to also search the search path, but using the character sets/collations from SYSTEM
first should be implemented.