Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 15593632487 for ; Wed, 27 Jan 2010 10:19:14 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 79979-06 for ; Wed, 27 Jan 2010 14:18:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-17937.dedibox.fr (sd-17937.dedibox.fr [88.191.100.74]) by mail.postgresql.org (Postfix) with ESMTP id 55EEE63226B for ; Wed, 27 Jan 2010 10:19:03 -0400 (AST) Received: from [192.168.0.5] (uni14-1-82-233-223-216.fbx.proxad.net [82.233.223.216]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id 141433B8F5; Wed, 27 Jan 2010 15:19:01 +0100 (CET) Message-ID: <4B604B54.7010905@lelarge.info> Date: Wed, 27 Jan 2010 15:19:00 +0100 From: Guillaume Lelarge User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: Seb CC: pgsql-sql@postgresql.org Subject: Re: rename primary key References: <87hbqo11yg.fsf@kolob.sebmags.homelinux.org> <1d581afe1001141934x2c525992w2e4bcf40a3113207@mail.gmail.com> <87d41c11g4.fsf@kolob.sebmags.homelinux.org> <4B500CA5.5060006@lelarge.info> <87eilrz6ps.fsf@kolob.sebmags.homelinux.org> In-Reply-To: <87eilrz6ps.fsf@kolob.sebmags.homelinux.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.063 tagged_above=-10 required=5 tests=AWL=-0.323, BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 201001/46 X-Sequence-Number: 33582 Le 15/01/2010 17:13, Seb a écrit : > On Fri, 15 Jan 2010 07:35:17 +0100, > Guillaume Lelarge wrote: > > [...] > >> Primary keys are constraints. They are enforced with an index, but >> actually they are constraints. So we put them on the constraints >> nodes. > >> There is the same behaviour for unique constraints. > > Thanks. Would there be any problem with listing the index used to > enforce the primary key constraint in the Indexes node to let us know of > its existence? In fact, psql does report it with the meta-command \d. > It was somewhat confusing to see Indexes(0), and then having to rename > an index to rename a primary key constraint. > Sorry, forgot to answer this mail. It was asked a few times before, and AFAICT the answer is still the same. It is a constraint before being an index. The fact that it is also an index is an implementation detail. I understand this is confusing. -- Guillaume. http://www.postgresqlfr.org http://dalibo.com