Re: PostgreSQL Gotchas

Поиск
Список
Период
Сортировка
От Chris Travers
Тема Re: PostgreSQL Gotchas
Дата
Msg-id 434ECE90.5040005@travelamericas.com
обсуждение исходный текст
Ответ на Re: PostgreSQL Gotchas  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Martijn van Oosterhout wrote:

>On Thu, Oct 13, 2005 at 12:21:14PM -0700, Chris Travers wrote:
>
>
>>>Since the end reward for all this work would be having to read CATALOGS
>>>WRITTEN IN ALL UPPER CASE, none of the key developers seem very
>>>interested ...
>>>
>>>
>>>
>>>
>
>I think you're slightly missing the point. Most people won't need to
>change any queries because unquoted identifiers are case-folded anyway.
>
>
Right.  That is part of the case for at least putting this on the TODO list.

>Which way doesn't matter, as long as it's consistant. No the main
>objection would be this (see below). Does anyone really want this? I'll
>take lowercase anyday... (Note, it's not exact, some things aren't SQL
>identifiers so would be left alone. But idea is the same.)
>
>
Ok.  If someone wanted it, we would see a patch already.  I understand
this.  Probably making AS optional would be a bigger priority because
such a patch exists already :-)

However.....

This is not only non-standard behavior but can also cause headaches in
certain porting circumstances. Adding it to the TODO list would at least
invite others to take this up *if* they (or their customers) required
it.  The work I see required would minimally be:

1)  Add a GUC variable to allow for changing the case folding behavior.
2)  Add duplicate entries for builtin aggregates and functions in the
catalogs but with upper-case names
3)  Adding a duplicate INFORMATION_SCHEMA with views off information_schema

Additionally if people depend on case folding for catalogs, you would
want to create a PG_CATALOG schema with views off pg_catalog.  However,
this seems to be peripheral and not central to the issues of managing
the data given that identifiers are treated as already double-quoted.

I *could* see a case where a company that does portability work (like
EnterpriseDB, which specializes in Oracle portability) might find such a
feature as important.  Adding the item to the TODO list would invite
patches where they are needed.

Best Wishes,
Chris Travers
Metatron Technology Consulting

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

Предыдущее
От: Chris Travers
Дата:
Сообщение: Re: PostgreSQL Gotchas
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: On "multi-master"