pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Lelarge <guillaume@lelarge.info>
To: Seb <spluque@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: rename primary key
Date: Wed, 27 Jan 2010 15:19:00 +0100
Message-ID: <4B604B54.7010905@lelarge.info> (raw)
In-Reply-To: <87eilrz6ps.fsf@kolob.sebmags.homelinux.org>
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>

Le 15/01/2010 17:13, Seb a écrit :
> On Fri, 15 Jan 2010 07:35:17 +0100,
> Guillaume Lelarge <guillaume@lelarge.info> 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



view thread (6+ messages)

Message-ID: <4B604B54.7010905@lelarge.info>
Permalink:  ../4B604B54.7010905@lelarge.info/
Also on:    postgresql.org/message-id/4B604B54.7010905@lelarge.info

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: guillaume@lelarge.info, spluque@gmail.com
  Subject: Re: rename primary key
  In-Reply-To: <4B604B54.7010905@lelarge.info>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox