Re: AW: Repost: Get table/field-identifiers in uppercase

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
Cc: "'K(dot)Reger(at)wwwdb(dot)de'" <K(dot)Reger(at)wwwdb(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: AW: Repost: Get table/field-identifiers in uppercase
Date: 2001-07-10 14:34:06
Message-ID: 28950.994775646@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)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-case letter or letters) and the <delimited identifier
body> of the <delimited identifier> (with all occurrences of
<quote> replaced by <quote symbol> and all occurrences of <dou-
blequote symbol> replaced by <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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-07-10 14:47:37 Re: Tips performance under solaris
Previous Message Bruce Momjian 2001-07-10 14:17:02 Re: Tips performance under solaris