Re: How to get started hacking on pgsql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to get started hacking on pgsql
Date: 2003-12-05 05:16:14
Message-ID: 18198.1070601374@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <gsstark(at)mit(dot)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 like
explain select * from test where a=1 order by a,b;
and it would not be cool to break that case while fixing
explain 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thierry Missimilly 2003-12-05 09:13:09 Re: tuning questions
Previous Message Eric Soroos 2003-12-05 04:52:22 Re: tuning questions