Re: Source code and database object identifiers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: brad st <brad(dot)st1211(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Source code and database object identifiers
Date: 2013-04-06 16:03:54
Message-ID: 5085.1365264234@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

brad st <brad(dot)st1211(at)gmail(dot)com> writes:
> We are planning to add PostgreSQL database support to our application. We
> have run into the issue of where in PostgreSQL is converting all the
> database object identifiers into lower case. I understand that's the how
> PostgreSQL works and I can double quote the identifiers and preserve the
> camel case. Unfortunately I cannot double quote the identifiers and need to
> preserve the camel case (mixed case) for the identifiers for our
> application to work.

You would really, really, really be better off fixing your application
to double-quote as needed. Otherwise you're locking yourself into an
entirely nonstandard variant of SQL.

> Can someone please provide some guidance where I should make the changes to
> preserve mixed case for identifiers?

Well, it's not exactly hard to lobotomize downcase_truncate_identifier,
or maybe better s/downcase_truncate_identifier/truncate_identifier/g in
parser/scan.l. The problem is dealing with all the ensuing breakage.
The first thing I imagine you'd hit is that there's general lack of
consistency among applications as to whether the names of built-in
functions are spelled in upper or lower case; this is partly because
many of those names are actually keywords according to the standard.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2013-04-06 18:46:26 Re: High CPU usage of stats collector
Previous Message Kevin Grittner 2013-04-06 14:49:03 Re: BEFORE UPDATE trigger doesn't change column value