X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id EDDA1D1B1E0 for ; Mon, 17 May 2004 14:00:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 79576-01 for ; Mon, 17 May 2004 14:00:24 -0300 (ADT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by svr1.postgresql.org (Postfix) with SMTP id 29223D1B1D1 for ; Mon, 17 May 2004 14:00:23 -0300 (ADT) Received: (qmail 3055 invoked by uid 65534); 17 May 2004 17:00:22 -0000 Received: from p5087E13C.dip0.t-ipconnect.de (EHLO hermes.hilbert.loc) (80.135.225.60) by mail.gmx.net (mp015) with SMTP; 17 May 2004 19:00:22 +0200 X-Authenticated: #1433807 Received: (from ncq@localhost) by hermes.hilbert.loc (8.11.6/8.11.6/SuSE Linux 0.5) id i4HGpD701630 for pgsql-sql@postgresql.org; Mon, 17 May 2004 18:51:13 +0200 Date: Mon, 17 May 2004 18:51:13 +0200 From: Karsten Hilbert To: pgsql-sql@postgresql.org Subject: Re: Unique Constraint with foreign Key Message-ID: <20040517185113.B592@hermes.hilbert.loc> References: <64366.138.88.163.115.1076432616.squirrel@physics.gmu.edu> <20040210201521.GA13737@wolff.to> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040210201521.GA13737@wolff.to> User-Agent: Mutt/1.3.22.1i Re-X-turn-receipt-to: Karsten.Hilbert@gmx.net Di-X-sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi-X-rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri-X-ority: 2 (High) X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/147 X-Sequence-Number: 17861 > > or Can i have varchar types of size 50 as primary keys in Postgres. > Yes. But unless the 50 character limit comes from a business rule, you > might want to use the type 'text'. And if that limit does come from a business rule you might want to think twice whether using columns constrained by business rules are good candidates for primary keys. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346