|
15 | 15 | *
|
16 | 16 | *
|
17 | 17 | * 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 $ |
19 | 19 | *
|
20 | 20 | *-------------------------------------------------------------------------
|
21 | 21 | */
|
@@ -4531,17 +4531,17 @@ prefix_selectivity(VariableStatData *vardata,
|
4531 | 4531 | * "x < greaterstr".
|
4532 | 4532 | *-------
|
4533 | 4533 | */
|
| 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 | + |
4534 | 4540 | greaterstrcon = make_greater_string(prefixcon, &opproc);
|
4535 | 4541 | if (greaterstrcon)
|
4536 | 4542 | {
|
4537 | 4543 | Selectivity topsel;
|
4538 | 4544 |
|
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 |
| - |
4545 | 4545 | topsel = ineq_histogram_selectivity(vardata, &opproc, false,
|
4546 | 4546 | greaterstrcon->constvalue,
|
4547 | 4547 | greaterstrcon->consttype);
|
|
0 commit comments