> From: Tom Lane [mailto:t...@sss.pgh.pa.us]
> 
> Alvaro Herrera <alvhe...@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




-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to