Re: About "Our CLUSTER implementation is pessimal" patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: About "Our CLUSTER implementation is pessimal" patch
Date
Msg-id 8918.1264090791@sss.pgh.pa.us
Whole thread Raw
In response to Re: About "Our CLUSTER implementation is pessimal" patch  (Leonardo F <m_lists@yahoo.it>)
Responses Re: About "Our CLUSTER implementation is pessimal" patch
Re: About "Our CLUSTER implementation is pessimal" patch
List pgsql-hackers
Leonardo F <m_lists@yahoo.it> writes:
>> By the time you make this actually work in all cases, it's probably
>> going to be more of a mess than the other way; 

> I meant to add only ASC/DESC; I would leave all other cases
> (non-btrees, custom expression btrees) to use the old index-scan method.

That hardly seems acceptable.

>> not to mention that it
>> doesn't work *at all* without violating SPI internals.

> You lost me there...

You're poking into a data structure you shouldn't be poking into:

/* Plans are opaque structs for standard users of SPI */
typedef struct _SPI_plan *SPIPlanPtr;

I hardly think that keeping yourself at arm's length from the planner
by getting cozy with SPI internals is a net improvement in modularity.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: lock_timeout GUC patch
Next
From: Tom Lane
Date:
Subject: Re: Git out of sync vs. CVS