88 * Portions Copyright (c) 1994, Regents of the University of California
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/access/gist/gistscan.c,v 1.73 2008/10/20 13:39:44 teodor Exp $
11+ * $PostgreSQL: pgsql/src/backend/access/gist/gistscan.c,v 1.74 2008/12/04 11:08:46 teodor Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -76,6 +76,8 @@ gistrescan(PG_FUNCTION_ARGS)
7676ItemPointerSetInvalid (& so -> curpos );
7777so -> nPageData = so -> curPageData = 0 ;
7878
79+ so -> qual_ok = true;
80+
7981/* Update scan key, if a new one is given */
8082if (key && scan -> numberOfKeys > 0 )
8183{
@@ -92,7 +94,6 @@ gistrescan(PG_FUNCTION_ARGS)
9294 * Next, if any of keys is a NULL and that key is not marked with
9395 * SK_SEARCHNULL then nothing can be found.
9496 */
95- so -> qual_ok = true;
9697for (i = 0 ;i < scan -> numberOfKeys ;i ++ ) {
9798scan -> keyData [i ].sk_func = so -> giststate -> consistentFn [scan -> keyData [i ].sk_attno - 1 ];
9899