Re: How to pass around collation information - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: How to pass around collation information
Date
Msg-id 4C00333E.6000106@enterprisedb.com
Whole thread Raw
In response to Re: How to pass around collation information  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: How to pass around collation information
List pgsql-hackers
On 28/05/10 23:15, Robert Haas wrote:
> On Fri, May 28, 2010 at 3:20 PM, Peter Eisentraut<peter_e@gmx.net>  wrote:
>> On fre, 2010-05-28 at 15:03 -0400, Robert Haas wrote:
>>> I think we need to think of the comparison operators as ternary, and
>>> the COLLATE syntax applied to columns or present in queries as various
>>> ways of setting defaults or explicit overrides for what the third
>>> argument will end up being.
>>
>> How could this extend to things like isalpha() or upper() that would
>> need access to ctype information?
>
> Good question.  :-(

Strictly speaking, collation and ctype are two different things. Which 
is a convenient way to evade the question :-).

But you could ask, how would we handle more fine-grained ctype in 
upper() then? Perhaps by adding a second argument for ctype. Similarly 
to to_tsvector([config, ] string), you could explicitly pass the ctype 
as an argument, or leave it out in which case a default is used. It 
wouldn't give you per-column ctype, though.

What does the spec have to say about the ctype used for upper() et al BTW?

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Failback with log shipping
Next
From: Jaime Casanova
Date:
Subject: Re: List traffic