Re: is this a bug or I am blind?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-general(at)postgresql(dot)org, Mage <mage(at)mage(dot)hu>
Subject: Re: is this a bug or I am blind?
Date: 2005-12-17 21:30:04
Message-ID: 20051217212955.GA4940@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Dec 17, 2005 at 02:08:06PM -0500, Tom Lane wrote:
> The weight of opinion later in the thread seems to be leaning towards
> the idea that we do not want to accept the word of strcoll/strxfrm about
> whether two strings are equal: there are too many scenarios where lax
> equality behavior would be a serious bug, and too few where it's
> critical to have it. I'm still prepared to listen to argument though.

Well, it seems to me that the problem is that there are several
differing ideas of equal, depending on what you're trying to do. The
real problem is that we are only allowed to choose one to be "=" and
we're not sure people will understand the issues.

> A possible compromise going forward would be to introduce an additional
> comparison operator that tests for strcoll equality --- but I'd vote for
> calling it something other than "=".

I think the real solution is to implement COLLATE support. Then we can
define all sorts of collations, like:

C/POSIX
C with case-insensetivity
hu_HU with binary tie-break
hu_HU with maximum munging
UTF-8 with accent insenstivity.

Then we can simply default everything to C/POSIX which would be a
straight binary match (priciple of least surprise) and if people want
anything else they need to specify the COLLATE they want either on the
column or in the query.

My patch was halfway there (the grammer was sorted, as were the SQL
propgation rules) but there was some work to go. I'll see if I can get
it to a working state.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2005-12-17 21:37:19 Re: outdated (bad) information in pg_stat_activity
Previous Message Bruce Momjian 2005-12-17 21:10:25 Re: [Pgsqlrpms-hackers] Re: DBlink documentation