OSDN Git Service

Add a CHECK_FOR_INTERRUPTS() to the loop in ExecMakeTableFunctionResult.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 10 Mar 2006 01:51:23 +0000 (01:51 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 10 Mar 2006 01:51:23 +0000 (01:51 +0000)
Otherwise you can't cancel queries like select ... from generate_series(1,1000000).

src/backend/executor/execQual.c

index 6283a73..fcc7d4b 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.188 2006/03/05 15:58:26 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.189 2006/03/10 01:51:23 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1280,6 +1280,8 @@ ExecMakeTableFunctionResult(ExprState *funcexpr,
                Datum           result;
                HeapTuple       tuple;
 
+               CHECK_FOR_INTERRUPTS();
+
                /*
                 * reset per-tuple memory context before each call of the function or
                 * expression. This cleans up any local memory the function may leak