OSDN Git Service

Ensure that EquivalenceClasses generated from ORDER BY keys contain proper
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 2 Nov 2007 18:54:15 +0000 (18:54 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 2 Nov 2007 18:54:15 +0000 (18:54 +0000)
commit97ddfc960738e6b178b4d16d4ec4553eed078827
treeb026f19f8f45542e4160d978ebe11ca82c6be27a
parent65bd783614c2e6ddeec42e8ba19e8b676ba5cee0
Ensure that EquivalenceClasses generated from ORDER BY keys contain proper
RelabelType nodes when the sort key is binary-compatible with the sort
operator rather than having exactly its input type.  We did this correctly
for index columns but not sort keys, leading to failure to notice that
a varchar index matches an ORDER BY request.  This requires a bit more work
in make_sort_from_pathkeys, but not anyplace else that I can find.
Per bug report and subsequent discussion.
src/backend/optimizer/path/pathkeys.c
src/backend/optimizer/plan/createplan.c