Every identifier is downcase & truncated by function "downcase_truncate_identifier()" before using it.
But since the function "downcase_truncate_identifier()" is not multibyte-charecter aware, it is not able to downcase some of special charecters in identifier like "my_SchemÄ".
If schema is created of name "my_SchemÄ", pg_namespace shows entries as "my_schemÄ" .
There is function str_tolower() which work as multibyte-character aware. Need to use same function where ever downcase required. So, it will create uniform down-casing at all places.
two places identified where need to add wide-character aware downcase :
1. downcase_truncate_identifier(); - Attaching patch for changes and small test case.
Following functions should also synchronise with "downcase_truncate_identifier()" :
2. pg_strcasecmp(); 3. pg_strncasecmp();
- to add fix at these functions (2,3) need to move str_tolower() from formatting.c from backend to some common location (may be in src/port) from where these can be used with client as well as server.