Re: [WIP] collation support revisited (phase 1)

From: "Radek Strnad" <radek(dot)strnad(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, "Radek Strnad" <radek(dot)strnad(at)gmail(dot)com>
Subject: Re: [WIP] collation support revisited (phase 1)
Date: 2008-07-21 01:15:56
Message-ID: de5165440807201815m758283eejcd1fb5533783f584@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I was trying to sort out the problem with not creating new catalog for
character sets and I came up following ideas. Correct me if my ideas are
wrong.

Since collation has to have a defined character set I'm suggesting to use
already written infrastructure of encodings and to use list of encodings in
chklocale.c. Currently databases are not created with specified character
set but with specified encoding. I think instead of pointing a record in
collation catalog to another record in character set catalog we might use
only name (string) of the encoding.

So each collation will be set over these encodings set in chklocale.c. Each
database will be able to use only collations that are created over same
("compatible") encodings regarding encoding_match_list. Each standard
collation (SQL standard) will be defined over all possible encodings
(hard-coded).

Comments?

Regards

Radek Strnad

On Sat, Jul 12, 2008 at 5:17 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
> > I think if we support UTF8 encoding, than it make sense to create own
> charsets,
> > because system locales could have defined collation for that.
>
> Say what? I cannot imagine a scenario in which a user-defined encoding
> would be useful. The amount of infrastructure you need for a new
> encoding is so large that providing management commands is just silly
> --- anyone who can create the infrastructure can do the last little bit
> for themselves. The analogy to index access methods is on point, again.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2008-07-21 01:18:29 Re: pg_dump additional options for performance
Previous Message Tatsuo Ishii 2008-07-21 01:13:58 Re: [PATCHES] WITH RECUSIVE patches 0717