X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E2FC6D6EA6 for ; Sun, 11 Sep 2005 00:51:48 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 16261-02 for ; Sun, 11 Sep 2005 03:51:45 +0000 (GMT) Received: from kuu.deru.net (kuu.deru.net [140.99.31.34]) by svr1.postgresql.org (Postfix) with ESMTP id D75D4D6EA2 for ; Sun, 11 Sep 2005 00:51:44 -0300 (ADT) Received: from [67.136.150.244] (helo=phx-dialpool-67-136-150-244.ispnetbilling.com) by kuu.deru.net with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.43) id 1EEIsW-0007oH-4Q for pgsql-sql@postgresql.org; Sat, 10 Sep 2005 20:51:40 -0700 From: Trent Shipley Reply-To: tshipley@deru.com To: pgsql-sql@postgresql.org Subject: Re: a "catch all" type ... such a thing? Date: Sat, 10 Sep 2005 20:54:00 -0700 User-Agent: KMail/1.8 References: <20050908181850.G1104@ganymede.hub.org> <200509102043.31876.peter_e@gmx.net> In-Reply-To: <200509102043.31876.peter_e@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509102054.00504.tshipley@deru.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - kuu.deru.net X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - deru.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200509/114 X-Sequence-Number: 22661 On Saturday 2005-09-10 11:43, Peter Eisentraut wrote: > Marc G. Fournier wrote: > > Are there any data types that can hold pretty much any type of > > character? UTF-16 isn't supported (or its missing from teh docs), and > > UTF-8 doesn't appear to have a big enough range ... > > UTF-8 has exactly the same "range" as UTF-16. In any case, the UTF-8 > encoding in PostgreSQL is probably your best choice, unless you want to > dig into the weirdness that is MULE_INTERNAL. The 8.1 beta documentation says that UTF-8 in earlier versions of Pg only covered the first 16 bits of Unicode. Unfortunately "pure" Unicode uses 32 bits and (according to my Unicode Demystified) needed at least 21 (?) bits to represent all the code points available in Unicode 3.x. (I think Unicode is now in 4.x.) This means that the code space supported by Pg 8.0 is technically too small. It shouldn't matter though, unless you are working with Chinese or a private character set.