Re: Fixed length data types issue

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Gregory Stark <gsstark(at)mit(dot)edu>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fixed length data types issue
Date: 2006-09-08 13:13:30
Message-ID: 20060908131330.GF5479@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 08, 2006 at 02:14:58PM +0200, Peter Eisentraut wrote:
> So "mathematically", you are right, the collation is a property of the
> operation, not of the operands. But semantically, the operands do
> carry the information of what collation order they would like to be
> compared under, and if two pieces of data with different choices meet,
> you need an override.

Sure, but SQL COLLATE handles all that just fine. At no point is the
collation a property of the operands. At best is a property of the
source of the operands but can be overridden at any point. SQL also
covers the case where there is ambiguity, and the writer of the query
has to clarify.

Collation is hard precisly because it's not a property of the operands,
which makes it very difficult to make postgresql do it.

> Incidentally, if you buy into that, this would also neatly solve the
> problem of how to arrange for column-specific case conversion rules,
> which SQL does not address at all.

SQL does say that UPPER and LOWER should be handled by Unicode rules,
however the notes do mention that they should probably pay attention to
the collation and character set, since the results are dependant on
them.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message mark 2006-09-08 13:28:21 Re: Fixed length data types issue
Previous Message Praveen Kumar N 2006-09-08 12:56:11 postgresql shared buffers