I'm implementing collation support. Proposal can be found at
http://archives.postgresql.org/pgsql-hackers/2008-07/msg00557.php
Progress so far:
- created catalogs pg_collation a pg_charset which are filled with three
standard collations
- initdb changes rows called "DEFAULT" in both catalogs during the bki
bootstrap phase with current system LC_COLLATE and LC_CTYPE or those set by
command line.
- new collations can be defined with command CREATE COLLATION <collation
name> FOR <character set specification> FROM <existing collation name>
[STRCOLFN <fn name>]
[ <pad characteristic> ] [ <case sensitive> ] [ LCCOLLATE <lc_collate> ] [
LCCTYPE <lc_ctype> ]
- because of pg_collation and pg_charset are catalogs individual for each
database, if you want to create a database with collation other than
specified, create it in template1 and then create database
- when connecting to database, it retrieves locales from pg_database and
sets them
Design & functionality changes left:
- move retrieveing collation from pg_database to pg_type
- get case sensitivity and pad characteristic working
- wrap locale setting and text comparison into functions that will be
referenced from pg_collation as regproc (make the code nice)
- when creating database with different collation than database cluster, the
database has to be reindexed. Any idea how to do it? Function
ReindexDatabase works only when database is opened.
- minor tweaks & fixes
Ideas? Comments?
Regards
Radek Strnad
Responses
pgsql-hackers by date
| Next: | From: Zdenek Kotala | Date: 2008-08-31 21:44:02 |
| Subject: Prototype: In-place upgrade |
| Previous: | From: Simon Riggs | Date: 2008-08-31 20:04:34 |
| Subject: Re: [HACKERS] Infrastructure changes for recovery |