From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
Cc: | Craig Ringer <craig(at)2ndquadrant(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Peter Eisentraut <peter_e(at)gmx(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: improve Chinese locale performance |
Date: | 2013-09-05 17:02:47 |
Message-ID: | CA+TgmoZ+2p-ObskiuNNW15E4fabEvphBmP7aysA8pWeMTbAB0Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Sep 4, 2013 at 11:02 PM, Quan Zongliang <quanzongliang(at)gmail(dot)com> wrote:
> I think of a new idea.
> Add a compare method column to pg_collation.
> Every collation has its own compare function or null.
> When function varstr_cmp is called, if specified collation
> has compare function, call it instead of strcoll().
I think we're going to need to have two kinds of collations:
OS-derived collations (which get all of their smarts from the OS), and
PG-internal collations (which use PG-aware code for everything).
Which I suspect is a bit more involved than what you're imagining, but
mixing and matching doesn't seem likely to end well.
However, what you're proposing might serve as a useful demonstration
of how much performance there is to be gained here.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2013-09-05 17:07:10 | Re: lcr v5 - primary/candidate key in relcache |
Previous Message | Alvaro Herrera | 2013-09-05 17:02:17 | Re: get rid of SQL_ASCII? |