1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Since createplan.c no longer cares whether index operators are lossy, it has

no particular need to do get_op_opfamily_properties() while building an
indexscan plan.  Postpone that lookup until executor start.  This simplifies
createplan.c a lot more than it complicates nodeIndexscan.c, and makes things
more uniform since we already had to do it that way for RowCompare
expressions.  Should be a bit faster too, at least for plans that aren't
re-used many times, since we avoid palloc'ing and perhaps copying the
intermediate list data structure.
This commit is contained in:
Tom Lane
2008-04-13 20:51:21 +00:00
parent 24558da14a
commit 226837e57e
13 changed files with 96 additions and 219 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeMergejoin.c,v 1.90 2008/01/01 19:45:49 momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeMergejoin.c,v 1.91 2008/04/13 20:51:20 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -180,7 +180,6 @@ MJExamineQuals(List *mergeclauses,
int op_strategy;
Oid op_lefttype;
Oid op_righttype;
bool op_recheck;
RegProcedure cmpproc;
AclResult aclresult;
@ -197,12 +196,10 @@ MJExamineQuals(List *mergeclauses,
get_op_opfamily_properties(qual->opno, opfamily,
&op_strategy,
&op_lefttype,
&op_righttype,
&op_recheck);
&op_righttype);
if (op_strategy != BTEqualStrategyNumber) /* should not happen */
elog(ERROR, "cannot merge using non-equality operator %u",
qual->opno);
Assert(!op_recheck); /* never true for btree */
/* And get the matching support procedure (comparison function) */
cmpproc = get_opfamily_proc(opfamily,