Re: Source code and database object identifiers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Source code and database object identifiers
Дата
Msg-id 5085.1365264234@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Source code and database object identifiers  (brad st <brad.st1211@gmail.com>)
Список pgsql-general
brad st <brad.st1211@gmail.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


В списке pgsql-general по дате отправления:

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: BEFORE UPDATE trigger doesn't change column value
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: High CPU usage of stats collector