Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4c91723

Browse files
author
Thomas G. Lockhart
committed
Check for null pointer returned from get_opname().
Don't bother checking for alternate strategies if so since it was more likely a function or some other non-operator anyway.
1 parent0f19904 commit4c91723

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎src/backend/optimizer/path/indxpath.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.29 1998/08/14 16:13:07 thomas Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.30 1998/08/16 05:37:04 thomas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -642,7 +642,10 @@ match_clause_to_indexkey(RelOptInfo *rel,
642642
Operatornewop;
643643

644644
opname=get_opname(restrict_op);
645-
newop=oper(opname,ltype,ltype, TRUE);
645+
if (opname!=NULL)
646+
newop=oper(opname,ltype,ltype, TRUE);
647+
else
648+
newop=NULL;
646649

647650
/* actually have a different operator to try? */
648651
if (HeapTupleIsValid(newop)&& (oprid(newop)!=restrict_op))
@@ -698,7 +701,10 @@ match_clause_to_indexkey(RelOptInfo *rel,
698701
restrict_op= ((Oper*) ((Expr*)clause)->oper)->opno;
699702

700703
opname=get_opname(restrict_op);
701-
newop=oper(opname,rtype,rtype, TRUE);
704+
if (opname!=NULL)
705+
newop=oper(opname,rtype,rtype, TRUE);
706+
else
707+
newop=NULL;
702708

703709
if (HeapTupleIsValid(newop)&& (oprid(newop)!=restrict_op))
704710
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp