Обсуждение: case sensitivity?

Поиск
Список
Период
Сортировка

case sensitivity?

От
Heine Ferreira
Дата:
Hi

I posted a similar question before. I was told that Postgres is always case sensitive.
I was actually referring to text data not identifiers.
I mean char and varchar fields.
I basicically want to avoid using upper in comparisons.
With some databases you can use a utf8 characterset and a unicode or win1252 coallation.
Has anyone tried this?
Do you know if this will work?

Thanks

H.F.

Re: case sensitivity?

От
Scott Marlowe
Дата:
On Mon, Jun 6, 2011 at 2:24 PM, Heine Ferreira <heine.ferreira@gmail.com> wrote:
> Hi
>
> I posted a similar question before. I was told that Postgres is always case
> sensitive.
> I was actually referring to text data not identifiers.
> I mean char and varchar fields.
> I basicically want to avoid using upper in comparisons.
> With some databases you can use a utf8 characterset and a unicode or win1252
> coallation.
> Has anyone tried this?
> Do you know if this will work?

Maybe the citext type would do what you want?

Re: case sensitivity?

От
Andrew Sullivan
Дата:
On Mon, Jun 06, 2011 at 10:24:45PM +0200, Heine Ferreira wrote:

> I basicically want to avoid using upper in comparisons.
> Has anyone tried this?
> Do you know if this will work?

There's a contrib module that will allow you to do this.  See the
citext datatype.

A

--
Andrew Sullivan
ajs@crankycanuck.ca