Re: Case sensitivity?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Case sensitivity?
Дата
Msg-id 20051227152919.GB32404@svana.org
обсуждение исходный текст
Ответ на Re: Case sensitivity?  (John McCawley <nospam@hardgeus.com>)
Ответы Re: Case sensitivity?  (John McCawley <nospam@hardgeus.com>)
Список pgsql-general
On Tue, Dec 27, 2005 at 09:14:20AM -0600, John McCawley wrote:
> Due to case weirdness in Postgres, particularly when accessing it from
> PHP, I completely abandoned mixed case table and column names.  I don't
> know if things have changed in the past several years, but when I first
> made the leap, mixed case was more trouble than it was worth.

Well, the rule is very simple, either always quote your identifiers, or
never quote them. If you always quote them, then you always need to
specify them in the same case. If you never quote them, then you always
get case-insensetivity.

> Even after I got over the initial hump and figured out how to make it
> work, there was enough weird behavior (i.e. being able to access a
> non-existent array element) in PHP that it led to a lot of bugs when
> using mixed-case in Postgres.  That's my two cents.  Your mileage may
> vary...

Hmm, you mean how column titles come back as lowercase? By strict SQL
standard they should come back as all upper-case, but you probably
don't want that either...

SQL has always been case-folding, never case-insensetive.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: John McCawley
Дата:
Сообщение: Re: Case sensitivity?
Следующее
От: "dfx"
Дата:
Сообщение: R: Case sensitivity? - I understood...