pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: MauMau <maumau307@gmail.com>
To: robertmhaas@gmail.com
To: Tatsuo Ishii <ishii@postgresql.org>
Cc: tgl@sss.pgh.pa.us
Cc: maksymb@fast.au.fujitsu.com
Cc: hlinnakangas@vmware.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: UTF8 national character data type support WIP patch and list of open issues.
Date: Sat, 21 Sep 2013 08:33:28 +0900
Message-ID: <225725531CAD4DA6AAED8F4F3F8EFF94@maumau> (raw)
In-Reply-To: <20130920.085853.1628917054830864151.t-ishii@sraoss.co.jp>
References: <904.1378304922@sss.pgh.pa.us>
	<B1A7485194DE4FDAB8FA781AFB570079@maumau>
	<CA+TgmobWv_96dSfSHv2ZJWSXAD=QTiBEKw-LT359sGArYe+AXQ@mail.gmail.com>
	<20130920.085853.1628917054830864151.t-ishii@sraoss.co.jp>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

From: "Tatsuo Ishii" <ishii@postgresql.org>
> What about limiting to use NCHAR with a database which has same
> encoding or "compatible" encoding (on which the encoding conversion is
> defined)? This way, NCHAR text can be automatically converted from
> NCHAR to the database encoding in the server side thus we can treat
> NCHAR exactly same as CHAR afterward.  I suppose what encoding is used
> for NCHAR should be defined in initdb time or creation of the database
> (if we allow this, we need to add a new column to know what encoding
> is used for NCHAR).
>
> For example, "CREATE TABLE t1(t NCHAR(10))" will succeed if NCHAR is
> UTF-8 and database encoding is UTF-8. Even succeed if NCHAR is
> SHIFT-JIS and database encoding is UTF-8 because there is a conversion
> between UTF-8 and SHIFT-JIS. However will not succeed if NCHAR is
> SHIFT-JIS and database encoding is ISO-8859-1 because there's no
> conversion between them.

Thanks for the idea, it sounds flexible for wider use.  Your cooperation 
would be much appreciated to devise implementation with as little code as 
possible.

Regards
MauMau




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



view thread (58+ messages)  latest in thread

Message-ID: <225725531CAD4DA6AAED8F4F3F8EFF94@maumau>
Permalink:  ../225725531CAD4DA6AAED8F4F3F8EFF94@maumau/
Also on:    postgresql.org/message-id/225725531CAD4DA6AAED8F4F3F8EFF94@maumau

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: maumau307@gmail.com, robertmhaas@gmail.com, ishii@postgresql.org, tgl@sss.pgh.pa.us, maksymb@fast.au.fujitsu.com, hlinnakangas@vmware.com
  Subject: Re: UTF8 national character data type support WIP patch and list of open issues.
  In-Reply-To: <225725531CAD4DA6AAED8F4F3F8EFF94@maumau>
  References: <904.1378304922@sss.pgh.pa.us> <B1A7485194DE4FDAB8FA781AFB570079@maumau> <CA+TgmobWv_96dSfSHv2ZJWSXAD=QTiBEKw-LT359sGArYe+AXQ@mail.gmail.com> <20130920.085853.1628917054830864151.t-ishii@sraoss.co.jp> <225725531CAD4DA6AAED8F4F3F8EFF94@maumau>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox