From: Mathijs Brands <mathijs@ilse.nl>
To: Mikael Kjellström <mikael.kjellstrom@_no_spam_flygtaxi.se>
Cc: pgsql-sql@postgresql.org
Subject: Re: Cluster and primary key
Date: Tue, 12 Jun 2001 19:03:42 +0200
Message-ID: <20010612190342.A8203@ilse.nl> (raw)
In-Reply-To: <Xns90B7643CE71ADmikaelkjellstromnosp@206.221.255.129>
References: <Xns90B7643CE71ADmikaelkjellstromnosp@206.221.255.129>
On Tue, Jun 05, 2001 at 07:51:11AM +0000, Mikael Kjellström allegedly wrote:
> I can't find a way to cluster a table on another index and keep it's
> primary key.
>
> When I define the table the primary key is created, but it's dropped when I
> cluster the table on another index.
>
> I've tried "alter table add constraint", but that's not supported for
> primary keys.
>
> I'm running 7.1.release4 on Debian Woody.
That can't be helped. The current cluster implementation drops all indexes on
the table you're clustering, with the exception of the index you're clustering
on. You could work around this limitation in the current cluster implementation
by recreating the index enforcing the primary key.
I hope this is of help to you,
Mathijs
--
"A book is a fragile creature. It suffers the wear of time,
it fears rodents, the elements, clumsy hands."
Umberto Eco
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: mathijs@ilse.nl, mikael.kjellstrom@_no_spam_flygtaxi.se
Subject: Re: Cluster and primary key
In-Reply-To: <20010612190342.A8203@ilse.nl>
* 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