Skip site navigation (1) Skip section navigation (2)

Re: [WIP] patch - Collation at database level

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Radek Strnad" <radek(dot)strnad(at)gmail(dot)com>
Subject: Re: [WIP] patch - Collation at database level
Date: 2008-07-29 08:41:37
Message-ID: 200807291141.39166.peter_e@gmx.net (view raw or flat)
Thread:
Lists: pgsql-hackers
Am Tuesday, 1. July 2008 schrieb Radek Strnad:
> I'm sending part of the code that I've done and is available for reviewing
> and I'm asking for your comments and some help because I'm new to
> PostgreSQL.
>
> Proposal: http://archives.postgresql.org/pgsql-hackers/2008-05/msg00857.php
>
> The code contains changes of parser, pg_collation catalog, parsenodes.h for
> CREATE COLLATION... and DROP COLLATION statements.

This patch is a small start on the way to adding a catalog and some SQL 
statements that add and remove entries from it.  But I don't see any 
collation support here, which is about 99% of the work that is left to do.  
Where are the collations going to come from?  Have the various build and 
distributions issues been thought about?  How are they going to be configured 
(not the SQL syntax, but how will the configuration be applied)?  How are the 
collations going to be applied at run-time?  How are you going to handle 
locale and encoding conflicts?  I also think that the clauses you have 
attached to your CREATE COLLATION statement (case-insensitive, 
accent-insensitive) are an oversimplification of reality.  I suggest you look 
up the Unicode collation algorithm to learn about who collations work in 
practice.

In my opinion, you are starting this project from the wrong end.  I would 
suggest you approach it like this:

- Find some collation implementations
- Patch PostgreSQL to link with them
- Patch PostgreSQL to apply them for comparison
- Implement system catalog to configure them
- Implement SQL statements to manipulate the system catalog

In response to

Responses

pgsql-hackers by date

Next:From: Abhijit Menon-SenDate: 2008-07-29 10:12:27
Subject: Re: [PATCH] "\ef <function>" in psql
Previous:From: Peter EisentrautDate: 2008-07-29 08:03:38
Subject: Re: patch: Add a separate TRUNCATE permission

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group