Re: Charset/collate support and function parameters

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Charset/collate support and function parameters
Date: 2004-10-31 07:13:01
Message-ID: Pine.LNX.4.44.0410310748370.2015-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2004-10-31 07:54:17 -HEAD regression failure on OpenBSD 3.6-current/x86
Previous Message Tatsuo Ishii 2004-10-31 06:45:20 Re: Charset/collate support and function parameters