X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 392583CA461 for ; Fri, 24 Dec 2004 20:17:40 +0000 (GMT) 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 56018-05 for ; Fri, 24 Dec 2004 20:17:28 +0000 (GMT) Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162]) by svr1.postgresql.org (Postfix) with ESMTP id DD46C3CA42A for ; Fri, 24 Dec 2004 20:17:28 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1Chvq1-0006iu-00; Fri, 24 Dec 2004 15:15:01 -0500 To: pgsql-general@postgresql.org Subject: Re: default index for primary key of a table References: In-Reply-To: From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 24 Dec 2004 15:15:00 -0500 Message-ID: <87r7lfcv23.fsf@stark.xeocode.com> Lines: 15 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.049 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200412/1198 X-Sequence-Number: 70810 Vinita.Bansal@trilogy.com writes: > Postgres automatically creates index for Primary key of a table. I want to > turn this off, so that the default index is not created for primary key. > How can I do this?? Postgres does not support UNIQUE constraints (and PRIMARY KEY implies a UNIQUE constraint) without an index. In Postgres the index is necessary to implement the constraint. In practice this doesn't usually cause any problem. Why do you want to do this? -- greg