A case for GIST supporting ORDER BY - Mailing list pgsql-hackers

From Michał Kłeczek
Subject A case for GIST supporting ORDER BY
Date
Msg-id EB2AF704-70FC-4D73-A97A-A7884A0381B5@kleczek.org
Whole thread Raw
Responses DRAFT GIST support for ORDER BY
List pgsql-hackers
Hi,

Some time ago I’ve provided some details with the issues we face when trying to use GIST and partitioning at the same time in the postgresql-general mailing list:
We decided to go with the solution to partition our table by:

RANGE (‘2100-01-01' <-> operation_date).

While it (somewhat) solves partition pruning issues described above there is another problem:
It is impossible to create a unique constraint on the partitioned table.

So now we cannot use INSERT … ON CONFLICT (…) DO UPDATE



My question to hackers:
Would it be feasible to implement ORDER BY column GIST index (only) scan for types with total order and sensible greatest and least values?

Thanks,
Michal
Attachment

pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Bug: RLS policy FOR SELECT is used to check new rows
Next
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: RE: logical decoding and replication of sequences, take 2