Received: from serv1.ilse.nl (serv1.ilse.nl [195.18.92.131]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5CH3oE55947 for ; Tue, 12 Jun 2001 13:03:50 -0400 (EDT) (envelope-from mathijs@serv0.ilse.nl) Received: from serv0.ilse.nl (serv0.ilse.nl [10.1.8.10]) by serv1.ilse.nl (8.11.0/8.10.2) with ESMTP id f5CH3gl78705; Tue, 12 Jun 2001 19:03:42 +0200 (MEST) Received: (from mathijs@localhost) by serv0.ilse.nl (8.11.3/8.11.1) id f5CH3gf08245; Tue, 12 Jun 2001 19:03:42 +0200 (CEST) (envelope-from mathijs) Date: Tue, 12 Jun 2001 19:03:42 +0200 From: Mathijs Brands To: =?iso-8859-1?Q?Mikael_Kjellstr=F6m?= Cc: pgsql-sql@postgresql.org Subject: Re: Cluster and primary key Message-ID: <20010612190342.A8203@ilse.nl> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: ; from mikael.kjellstrom@_no_spam_flygtaxi.se on Tue, Jun 05, 2001 at 07:51:11AM +0000 X-Unexpected-Header: The Spanish Inquisition X-Archive-Number: 200106/186 X-Sequence-Number: 3438 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