Re: is this a bug or I am blind?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: is this a bug or I am blind?
Дата
Msg-id 20051217212955.GA4940@svana.org
обсуждение исходный текст
Ответ на Re: is this a bug or I am blind?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: is this a bug or I am blind?
Re: is this a bug or I am blind?
Список 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@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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [Pgsqlrpms-hackers] Re: DBlink documentation
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: outdated (bad) information in pg_stat_activity