Re: Charset/collate support and function parameters - Mailing list pgsql-hackers

From Dennis Bjorklund
Subject Re: Charset/collate support and function parameters
Date
Msg-id Pine.LNX.4.44.0410310748370.2015-100000@zigo.dhs.org
Whole thread Raw
In response to Re: Charset/collate support and function parameters  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: Charset/collate support and function parameters
List pgsql-hackers
On Sun, 31 Oct 2004, Tatsuo Ishii wrote:

> I wonder what is the intention to allow such that syntax. It seems
> it's just useless since we could make a function bar() which accepts
> any charsets.

One could override the behaviour of functions by adding a charset and a
adding new definition of an old function name for that charset. Like
adding a new collation and define a new cmp() function for that
collation that works different then some old definitons of cmp().

The whole discussion came because I start to look at problems from what is
in the specification and try to fit that into pg. Not everything will fit,
it's just my starting point when discussing. Tom starts at the other end
and then it looks like a big controversy.

About the explosion of the number of functions needed. It's not obvious to
me that there will be an explosion if one manage to allow both full types
that include charset and more generic functions that work on any text
type. It seems to me that there are not that many interesting combinations
anyway. Most applications will use one charset and define functions that
work with just that charset.

Anyway, the only way to see what problems would arise is to try. I was
hoping that the step A and B in the plan was something that we wanted no
matter of how the locale problem was later solved. With those in place it
would be easier to experiment.

-- 
/Dennis Björklund



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Charset/collate support and function parameters
Next
From: Stefan Kaltenbrunner
Date:
Subject: -HEAD regression failure on OpenBSD 3.6-current/x86