Re: Incremental sort for access method with ordered scan support (amcanorderbyop) - Mailing list pgsql-hackers

From Miroslav Bendik
Subject Re: Incremental sort for access method with ordered scan support (amcanorderbyop)
Date
Msg-id CAPoEpV02WhawuWnmnKet6BqU63bEu7oec0pJc=nKMtPsHMzTXQ@mail.gmail.com
Whole thread Raw
In response to Re: Incremental sort for access method with ordered scan support (amcanorderbyop)  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Incremental sort for access method with ordered scan support (amcanorderbyop)
List pgsql-hackers
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
list_copy_head (v3.1) or add checks before call (v3.2).

I don't know if it's a good idea to modify list_copy_head. It will add
additional overhead to every call.

-- 
Best regards
Miroslav

Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: [PATCH] Allow Postgres to pick an unused port to listen
Next
From: Yurii Rashkovskii
Date:
Subject: Re: [PATCH] Allow Postgres to pick an unused port to listen