Teach planner to optionally ignore index columns that have an equality
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Jun 2005 04:04:30 +0000 (04:04 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Jun 2005 04:04:30 +0000 (04:04 +0000)
commitbd6bf50b032a6d095c7f1513aa209d632b264a2f
treef8c528fe1743a82d44e604bdb1d0adb897336c1d
parent189f89cb0eeff30ca2c77dd0e3ff2bc6e9338d7d
Teach planner to optionally ignore index columns that have an equality
constraint while determining whether the index sort order matches the
query's ORDER BY.  This for example allows an index on (x,y) to match
... WHERE x = 42 ORDER BY y;
It only works for btree indexes, but since those are the only ones we
currently have that are ordered at all, that's good enough for now.
Per popular demand.
src/backend/optimizer/path/indxpath.c