Re: String comparision in PostgreSQL

From: Nicola Cisternino <ncister(at)tiscali(dot)it>
To: ringerc(at)ringerc(dot)id(dot)au
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: String comparision in PostgreSQL
Date: 2012-08-30 09:16:40
Message-ID: 503F2F78.7060805@tiscali.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Il 30/08/2012 4.01, Craig Ringer ha scritto:
> On 08/28/2012 10:46 PM, Nicola Cisternino wrote:
>
>> 1) Why PostgreSQL don't use COLLATE to manage case sensitive /
>> insensitive comparision (I think it's the best and ANSI standard way
>> ....) ?
>
> Support for per-column collations in PG was only added relatively
> recently - in 9.1, by the looks:
>
> http://www.postgresql.org/docs/9.1/static/collation.html
>
> Prior to that, there was no meaningful way to use case insensitive
> collations, as these would affect the whole database, including system
> tables, which could break all sorts of things in new and exciting ways.
>
> With the advent of per-column and per-operation collation control,
> case-insensitive collations become very appealing.
>
> One of the challenges with adding case insensitive collations is that,
> AFAIK, collations are implemented using the operating system charset
> and locale support, which may not offer case insensitive collation
> directly.
>
> Another challenge is the rather ... variable ... meaning of "case
> insensitive". Results are likely to vary between host platforms and
> versions.
>
> Still, now that per-col / per-op collation is supported, it'd be nice
> to have. I don't know if it's just a matter of needing someone with
> the desire and time (or funding) and expertise to design and build it,
> or if there'd be issues with getting it accepted.
>
> --
> Craig Ringer
>
Thus the problem is that " .... collations are implemented using the
operating system charset and locale support ... " while, other engines,
implements collations internally ..... is it right ?
Thanks.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jason Armstrong 2012-08-30 10:36:03 Re: PQfformat question and retrieving bytea data in C
Previous Message Craig Ringer 2012-08-30 08:52:16 Re: [postgis-users] pg_dump -s should use add_geometrycolumn(...)