Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VMmts-000481-O4 for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Sep 2013 22:40:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VMmts-00016f-6U for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Sep 2013 22:40:40 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VMmtq-00016W-RQ for pgsql-hackers@postgresql.org; Thu, 19 Sep 2013 22:40:39 +0000 Received: from mail-pd0-x235.google.com ([2607:f8b0:400e:c02::235]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VMmtn-0004Kj-OF for pgsql-hackers@postgresql.org; Thu, 19 Sep 2013 22:40:38 +0000 Received: by mail-pd0-f181.google.com with SMTP id g10so9009325pdj.12 for ; Thu, 19 Sep 2013 15:40:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:cc:references:in-reply-to:subject:date :mime-version:content-type:content-transfer-encoding; bh=TesfVwt/kMXVmNf4UQUvMjec6Fqeq+DcWMtV+cUXL9E=; b=OJQB8cfwAA+SKzWjzOgy3u1rnFe0vHkWXfxAMl79oqC3Gc3OsjE0PhS1q7djlb2kKg Gotvpa3jn5bUtBRxI2jMFIbRlu63bt7O5GL9KYuubECTRPhM2QgWi4DnNXrcBt8qkqVr UmysXm0qlxeLLf/LM/QNTaa1AufI1uF/73CMREL77+PmzCQJWEMAECif9TFfUVwtotFs mwJZktLLdXZbmdyfLPeLGtDZvAfQ9IDrskINUCbuO/D7dnWV681rku2gAhaAN2yhguqG 4eFZUnP0kVmyDOD6W3vgBUqPqB/GCdRrr40swmrAOoJ9r/kkKFfEE4abQWGzmN1ivSd2 hSLA== X-Received: by 10.66.25.70 with SMTP id a6mr5217019pag.68.1379630434135; Thu, 19 Sep 2013 15:40:34 -0700 (PDT) Received: from maumau (p6019-ipbfp211sizuokaden.shizuoka.ocn.ne.jp. [114.170.213.19]) by mx.google.com with ESMTPSA id ha10sm11574723pbc.23.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Sep 2013 15:40:33 -0700 (PDT) Message-ID: <37B76474BB3149FD841373E12E355851@maumau> From: "MauMau" To: "Robert Haas" Cc: "Tom Lane" , "Boguk, Maksym" , "Heikki Linnakangas" , References: <522594E8.2050106@vmware.com><904.1378304922@sss.pgh.pa.us> In-Reply-To: Subject: Re: UTF8 national character data type support WIP patch and list of open issues. Date: Fri, 20 Sep 2013 07:42:19 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6002.18197 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18463 X-Pg-Spam-Score: 0.6 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org From: "Robert Haas" > That may be what's important to you, but it's not what's important to > me. National character types support may be important to some potential users of PostgreSQL and the popularity of PostgreSQL, not me. That's why national character support is listed in the PostgreSQL TODO wiki. We might be losing potential users just because their selection criteria includes national character support. > I am not keen to introduce support for nchar and nvarchar as > differently-named types with identical semantics. Similar examples already exist: - varchar and text: the only difference is the existence of explicit length limit - numeric and decimal - int and int4, smallint and int2, bigint and int8 - real/double precison and float In addition, the SQL standard itself admits: "The s NATIONAL CHARACTER are used to specify the character type with an implementation- defined character set. Special syntax (N'string') is provided for representing literals in that character set. ... "NATIONAL CHARACTER" is equivalent to the corresponding with a specification of "CHARACTER SET CSN", where "CSN" is an implementation-defined ." "A is equivalent to a with the "N" replaced by "", where "" is an implementation- defined ." > And I think it's an > even worse idea to introduce them now, making them work one way, and > then later change the behavior in a backward-incompatible fashion. I understand your feeling. The concern about incompatibility can be eliminated by thinking the following way. How about this? - NCHAR can be used with any database encoding. - At first, NCHAR is exactly the same as CHAR. That is, "implementation-defined character set" described in the SQL standard is the database character set. - In the future, the character set for NCHAR can be selected at database creation like Oracle's CREATE DATABAWSE .... NATIONAL CHARACTER SET AL16UTF16. The default it the database set. Could you tell me what kind of specification we should implement if we officially support national character types? 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