Re: Database Name Case Sensitivity

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Database Name Case Sensitivity
Дата
Msg-id Pine.LNX.4.30.0104052329390.1084-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: Database Name Case Sensitivity  ("ADBAAMD" <adba.amdocs@bell.ca>)
Список pgsql-general
ADBAAMD writes:

> Brian T. Allen wrote:
>
> > I just ran into that too, and find it most undesirable.  I don't know
> > whether that is part of the SQL spec or not, but it seems very odd.  The
> > queries seem to be converted to lowercase before they ever reach the SQL
> > engine.
>
>     Correct me if I'm wrong, but doesn't it look like a trend in PostgreSQL
> development?  Instead of adding options and keeping the standard or
> previous behaviour, a new behaviour is attached to old syntax, and if
> you want to keep the standard or old results you have to do something else.
>
>     The "Right Thing"(TM) to do in this case would be to be case insensitive
> by default, according to the traditional (if not standard) SQL practice,
> and do case sensitiveness if using quotes.

The standard behaviour, which has been in PostgreSQL for the longest time,
is that unquoted identifiers are folded to lower case (actually it's
supposed to be upper case in SQL, but that won't make a difference here),
whereas quoted identifiers preserve case.  There is no "previous" or
traditional alternative here.

This rule is only valid in SQL of course.  When we're in the shell or in a
libpq API call, it would be pretty hard to simulate a double quote, other
than by means such as

psql -d '"Foo"'

which is surely worse than anything we've got now.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


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

Предыдущее
От: Maurice Balick
Дата:
Сообщение: locked up backends
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: locked up backends