]> granicus.if.org Git - postgresql/commit
Heavily refactor btsortsupport_worker.
authorRobert Haas <rhaas@postgresql.org>
Thu, 22 Jan 2015 15:46:42 +0000 (10:46 -0500)
committerRobert Haas <rhaas@postgresql.org>
Thu, 22 Jan 2015 15:54:16 +0000 (10:54 -0500)
commitb529b65d1bf8537ca7fa024760a9782d7c8b66e5
treebbb75c47a588a076096d337ca438ced849b643d2
parent813ffc0ef9f3c19dc01de19b1a718f2dda495f4f
Heavily refactor btsortsupport_worker.

Prior to commit 4ea51cdfe85ceef8afabceb03c446574daa0ac23, this function
only had one job, which was to decide whether we could avoid trampolining
through the fmgr layer when performing sort comparisons.  As of that
commit, it has a second job, which is to decide whether we can use
abbreviated keys.  Unfortunately, those two tasks are somewhat intertwined
in the existing coding, which is likely why neither Peter Geoghegan nor
I noticed prior to commit that this calls pg_newlocale_from_collation() in
cases where it didn't previously.  The buildfarm noticed, though.

To fix, rewrite the logic so that the decision as to which comparator to
use is more cleanly separated from the decision about abbreviation.
src/backend/utils/adt/varlena.c