GIST index : order Hack : getting the order used by CLUSTER .. USING my_index - Mailing list pgsql-general

From Rémi Cura
Subject GIST index : order Hack : getting the order used by CLUSTER .. USING my_index
Date
Msg-id CAJvUf_tMkackbLCAKevoswhrCymxt=sm7_WOGqt3Bcaj8UhdRA@mail.gmail.com
Whole thread Raw
Responses Re: GIST index : order Hack : getting the order used by CLUSTER .. USING my_index
List pgsql-general
Hey List,

I would like to be able to get the rows following the order of an index (*NOT* getting an order by accelerated, but only an order defined by an index).

Something like this :

SELECT my_row
FROM my_table
ORDER BY the_index ASC

where the_index is a GIST index over points.

I know there is a possibility as it is exactly what the command
CLUSTER my_table USING the_index 
does.


I read the following page : http://www.postgresql.org/docs/9.3/static/indexes-ordering.html, but it is not of great help.
How much of a hack is it?

Cheers,

Rémi-C

pgsql-general by date:

Previous
From: Andres Freund
Date:
Subject: Re: GIN fast update technique and work_mem
Next
From: Amit Langote
Date:
Subject: Re: GIN fast update technique and work_mem