Thanks, for suggestions.
On Sun 02. 07. 2023 at 10:18 Richard Guo wrote:
> 1. For comment "On success, the result list is ordered by pathkeys.", I
> think it'd be more accurate if we say something like "On success, the
> result list is ordered by pathkeys or a prefix list of pathkeys."
> consider
> I've just pushed a fix to master for this. See [1]. If you base your
> patch atop of that you should be able to list list_copy_head() without
> any issues.
Thanks for this fix. Now the version
am_orderbyop_incremental_sort_v3.1.patch [1] works without issues
using the master branch.
[1]
https
Sorry for spamming, but I found a more elegant way to check if
query_paths is NIL without modified list_copy_head.
Here is a third iteration of this patch.
--
Miroslav
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index b8000da56d..735b41552a 100644
-
Thanks for feedback
> 2. You can use list_copy_head(root->query_pathkeys,
> list_length(orderbyclauses)); instead of:
>
> + useful_pathkeys = list_truncate(list_copy(root->query_pathkeys),
> + list_length(orderbyclauses));
This code will crash if query_pathkeys is NIL. I need either modify
li
po 17. 4. 2023 o 15:26 Richard Guo napísal(a):
>
>
> On Sun, Apr 16, 2023 at 1:20 AM Miroslav Bendik
> wrote:
>>
>> Postgres allows incremental sort only for ordered indexes. Function
>> build_index_paths dont build partial order paths for access methods
>&g
Current version of postgresql don't support incremental sort using
ordered scan on access method.
Example database:
CREATE TABLE t (id serial, p point, PRIMARY KEY(id));
INSERT INTO t (SELECT generate_series(1, 1000), point(random(), random()));
CREATE INDEX p_idx ON t USING gist(p);
ANALYZE;