Re: How to get started hacking on pgsql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How to get started hacking on pgsql
Date
Msg-id 18198.1070601374@sss.pgh.pa.us
Whole thread Raw
In response to How to get started hacking on pgsql  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> At what point in the process would it make sense to check for this?

You'd need to mess with the code that generates "pathkeys" describing
the sort ordering of index scans --- read about pathkeys in
src/backend/optimizer/README.  As Hannu notes nearby, the existing
code is not broken for cases likeexplain select * from test where a=1 order by a,b;
and it would not be cool to break that case while fixingexplain select * from test where a=1 order by b;
This probably means that you'd need to offer up multiple pathkey
descriptions of an index's sort order, ie, both ((a), (b)) and ((b)).
I'm not sure how painful that would be.  You could quick-hack it by
generating multiple indexscan Paths that are really identical but have
different pathkeys --- but I think that would have unpleasant
consequences for planning time ... it'd be better to attach multiple
pathkeys to a single Path.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvar Freude
Date:
Subject: Re: bytea, index and like operator again and detailed
Next
From: Oleg Bartunov
Date:
Subject: OpenFTS-perl-0.35 released