Re: Proposal - Support for National Characters functionality - Mailing list pgsql-hackers

From Arulappan, Arul Shaji
Subject Re: Proposal - Support for National Characters functionality
Date
Msg-id 3AFB102B67FAEE48874E0607386DF4210DD2CFE0@SYDExchTmp.au.fjanz.com
Whole thread Raw
In response to Re: Proposal - Support for National Characters functionality  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
>
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > Also, as far as I understand what we want to control here is the
> > encoding that the strings are in (the mapping of bytes to
characters),
> > not the collation (the way a set of strings are ordered).  So it
> > doesn't make sense to set the NATIONAL CHARACTER option using the
> > COLLATE keyword.
>
> My thought is that we should simply ignore the NATIONAL CHARACTER
syntax,
> which is not the first nor the last brain-damaged feature design in
the SQL
> standard.  It's basically useless for what we want because there's
noplace to
> specify which encoding you mean.  Instead, let's consider that COLLATE
can
> define not only the collation but also the encoding of a string datum.

Yes, don't have a problem with this. If I understand you correctly, this
will be simpler syntax wise, but still get nchar/nvarchar data types
into a table, in different encoding from the rest of the table.

>
> There's still the problem of how do you get a string of a nondefault
encoding
> into the database in the first place.

Yes, that is the bulk of the work. Will need change in a whole lot of
places.

Is a step-by-step approach worth exploring ? Something similar to:

Step 1: Support nchar/nvarchar data types. Restrict them only to UTF-8
databases to begin with.
Step 2: Support multiple encodings in a database. Remove the restriction
imposed in step1.


Rgds,
Arul Shaji





pgsql-hackers by date:

Previous
From: "Arulappan, Arul Shaji"
Date:
Subject: Re: Proposal - Support for National Characters functionality
Next
From: Michael Paquier
Date:
Subject: Re: backup.sgml-cmd-v003.patch