Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes:
> I do not think the standard states what should happen when you start mixing
> quoted and unquoted identifiers for the same object.
Actually, it does:
13)A <regular identifier> and a <delimited identifier> are equiva- lent if the <identifier body> of
the<regular identifier> (with every letter that is a lower-case letter replaced by the equiva- lent
upper-caseletter or letters) and the <delimited identifier body> of the <delimited identifier> (with all
occurrencesof <quote> replaced by <quote symbol> and all occurrences of <dou- blequote symbol>
replacedby <double quote>), considered as the repetition of a <character string literal> that specifies a
<character set specification> of SQL_TEXT and an implementation- defined collation that is sensitive to
case,compare equally according to the comparison rules in Subclause 8.2, "<comparison predicate>".
The spec expects unquoted identifiers to be made case-insensitive by
folding them to upper case. We do it by folding to lower case, instead.
While this isn't 100% standard, it's unlikely to be changed. Too many
applications would break...
regards, tom lane