From: Teodor Sigaev Date: Thu, 4 Dec 2008 11:10:06 +0000 (+0000) Subject: Initialize GISTScanOpaque->qual_ok even if there is no conditions. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=ca6c1a3bd363d64130fbf870635d846c04c9aa75;p=users%2Fbernd%2Fpostgres.git Initialize GISTScanOpaque->qual_ok even if there is no conditions. --- diff --git a/src/backend/access/gist/gistscan.c b/src/backend/access/gist/gistscan.c index 0776a95b1c..730c10a029 100644 --- a/src/backend/access/gist/gistscan.c +++ b/src/backend/access/gist/gistscan.c @@ -84,6 +84,8 @@ gistrescan(PG_FUNCTION_ARGS) ItemPointerSetInvalid(&so->markpos); so->nPageData = so->curPageData = 0; + so->qual_ok = true; + /* Update scan key, if a new one is given */ if (key && scan->numberOfKeys > 0) { @@ -100,7 +102,6 @@ gistrescan(PG_FUNCTION_ARGS) * Next, if any of keys is a NULL and that key is not marked with * SK_SEARCHNULL then nothing can be found. */ - so->qual_ok = true; for (i = 0; i < scan->numberOfKeys; i++) { scan->keyData[i].sk_func = so->giststate->consistentFn[scan->keyData[i].sk_attno - 1];