pgsql: Create an explicit concept of collations that work for any encod

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Create an explicit concept of collations that work for any encod
Date: 2011-03-11 18:20:37
Message-ID: E1Py6x3-0007oD-5w@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Create an explicit concept of collations that work for any encoding.

Use collencoding = -1 to represent such a collation in pg_collation.
We need this to make the "default" entry work sanely, and a later
patch will fix the C/POSIX entries to be represented this way instead
of duplicating them across all encodings. All lookup operations now
search first for an entry that's database-encoding-specific, and then
for the same name with collencoding = -1.

Also some incidental code cleanup in collationcmds.c and pg_collation.c.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e3c732a85c0f247617b2d44ea567f35731b03ea6

Modified Files
--------------
doc/src/sgml/catalogs.sgml | 12 ++--
src/backend/catalog/information_schema.sql | 6 +-
src/backend/catalog/namespace.c | 48 +++++++++----
src/backend/catalog/pg_collation.c | 67 +++++++++++-------
src/backend/commands/collationcmds.c | 83 +++++++++++++++------
src/bin/psql/tab-complete.c | 2 +-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_collation.h | 10 ++--
src/test/regress/expected/collate.linux.utf8.out | 12 ++--
9 files changed, 158 insertions(+), 84 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2011-03-11 18:59:40 Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.
Previous Message Robert Haas 2011-03-11 16:59:22 Re: Re: [COMMITTERS] pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,