Re: Cluster and primary key - Mailing list pgsql-sql

From Mathijs Brands
Subject Re: Cluster and primary key
Date
Msg-id 20010612190342.A8203@ilse.nl
Whole thread Raw
In response to Cluster and primary key  (mikael.kjellstrom@_no_spam_flygtaxi.se (Mikael Kjellström))
List pgsql-sql
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."
UmbertoEco 
 


pgsql-sql by date:

Previous
From: Gerald Gutierrez
Date:
Subject: Are SQL commands "atomic" ?
Next
From: Martín Marqués
Date:
Subject: tables, permissions, sequences