Re: Using unique btree indexes for pathkeys with one extra column

2019-07-15 Thread Tom Lane
Thomas Munro writes: > In the category "doing more tricks with our existing btrees", which > includes all that difficult stuff like skip scans and incremental > sort, here's an easier planner-only one: if you have a unique index > on (a) possibly "including" (b) and you have a pathkey (a, b),

Re: Using unique btree indexes for pathkeys with one extra column

2019-07-14 Thread David Rowley
On Mon, 15 Jul 2019 at 12:59, Thomas Munro wrote: > In the category "doing more tricks with our existing btrees", which > includes all that difficult stuff like skip scans and incremental > sort, here's an easier planner-only one: if you have a unique index > on (a) possibly "including" (b) and

Using unique btree indexes for pathkeys with one extra column

2019-07-14 Thread Thomas Munro
Hello, In the category "doing more tricks with our existing btrees", which includes all that difficult stuff like skip scans and incremental sort, here's an easier planner-only one: if you have a unique index on (a) possibly "including" (b) and you have a pathkey (a, b), you can use an index