Re: Why does cluster need the indexname? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Why does cluster need the indexname?
Date
Msg-id 8472.961183018@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why does cluster need the indexname?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
>> I'm probably just missing the point, but why do I have to specify the
>> indexname for cluster if the table already has a primary key? Wouldn't
>> cluster want to use the primary key for the table (if it exists) anyway?

No, you wouldn't necessarily want to cluster on the primary key.
You might be using the primary key to enforce logical consistency,
but be doing most of your actual scans on some secondary index.

I always thought that CLUSTER was being redundant in the other
direction: if you've told it the index name, there's no need to
tell it the base table name.  It can find that out from the index.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Why does cluster need the indexname?
Next
From: Ed Loehr
Date:
Subject: Re: planner question re index vs seqscan