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

src/backend/executor/execQual.c

index 0f0791713081b8e5c37fc6dd181ffa98416ba79e..5dbca99326f087de47f0c7119c660011b16e491e 100644 (file)
@@ -1294,6 +1294,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