Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 164899d

Browse files
committed
Revert thinko introduced into prefix_selectivity() by my recent patch:
make_greater_string needs the < procedure not the >= one. Spotted by Peter.
1 parent 23057f5 commit 164899d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/backend/utils/adt/selfuncs.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.245 2008/03/09 00:32:09 tgl Exp $
18+
* $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.246 2008/03/17 17:13:54 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -4531,17 +4531,17 @@ prefix_selectivity(VariableStatData *vardata,
45314531
* "x < greaterstr".
45324532
*-------
45334533
*/
4534+
cmpopr = get_opfamily_member(opfamily, vartype, vartype,
4535+
BTLessStrategyNumber);
4536+
if (cmpopr == InvalidOid)
4537+
elog(ERROR, "no < operator for opfamily %u", opfamily);
4538+
fmgr_info(get_opcode(cmpopr), &opproc);
4539+
45344540
greaterstrcon = make_greater_string(prefixcon, &opproc);
45354541
if (greaterstrcon)
45364542
{
45374543
Selectivity topsel;
45384544

4539-
cmpopr = get_opfamily_member(opfamily, vartype, vartype,
4540-
BTLessStrategyNumber);
4541-
if (cmpopr == InvalidOid)
4542-
elog(ERROR, "no < operator for opfamily %u", opfamily);
4543-
fmgr_info(get_opcode(cmpopr), &opproc);
4544-
45454545
topsel = ineq_histogram_selectivity(vardata, &opproc, false,
45464546
greaterstrcon->constvalue,
45474547
greaterstrcon->consttype);

0 commit comments

Comments
 (0)