X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 54C439FB282 for ; Fri, 28 Jul 2006 16:35:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 79448-02 for ; Fri, 28 Jul 2006 16:34:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id DBC669FB280 for ; Fri, 28 Jul 2006 16:34:44 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Fri, 28 Jul 2006 19:34:34 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 28 Jul 2006 14:34:34 -0500 Subject: Re: primary keys as TEXT From: Scott Marlowe To: Manlio Perillo Cc: pgsql-sql@postgresql.org In-Reply-To: <44C9CCC8.8020304@libero.it> References: <44C9CCC8.8020304@libero.it> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1154115274.31664.132.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 28 Jul 2006 14:34:34 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.106 tagged_above=0 required=5 tests=AWL, SPF_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200607/362 X-Sequence-Number: 25936 On Fri, 2006-07-28 at 03:37, Manlio Perillo wrote: > Hi. > > There can be performancs problems in having primary keys of type TEXT? > What about having a primary key of 3 columns (all of type TEXT)? The biggest problem with using text as a primary key or foreign key is that text types are locale dependent, so that you might get one behaviour on one server and another behaviour on another, depending on configuration of the locale and the locale support on that machine. For instance, if you have a locale that says that E and e are equivalent, and another locale that says they aren't...