From 37168b8da43d9a6f7471cf757119ece6c96fb2b9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 13 Aug 2000 02:50:35 +0000 Subject: Clean up handling of variable-free qual clauses. System now does the right thing with variable-free clauses that contain noncachable functions, such as 'WHERE random() < 0.5' --- these are evaluated once per potential output tuple. Expressions that contain only Params are now candidates to be indexscan quals --- for example, 'var = ($1 + 1)' can now be indexed. Cope with RelabelType nodes atop potential indexscan variables --- this oversight prevents 7.0.* from recognizing some potentially indexscanable situations. --- src/include/nodes/execnodes.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/include/nodes') diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index a9ef6e78ae..6e691c1d78 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: execnodes.h,v 1.45 2000/08/06 04:26:29 tgl Exp $ + * $Id: execnodes.h,v 1.46 2000/08/13 02:50:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -380,6 +380,7 @@ typedef struct CommonScanState * NumScanKeys array of no of keys in each Skey struct * RuntimeKeyInfo array of array of flags for Skeys evaled at runtime * RuntimeContext expr context for evaling runtime Skeys + * RuntimeKeysReady true if runtime Skeys have been computed * RelationDescs ptr to array of relation descriptors * ScanDescs ptr to array of scan descriptors * ---------------- @@ -394,6 +395,7 @@ typedef struct IndexScanState int *iss_NumScanKeys; int **iss_RuntimeKeyInfo; ExprContext *iss_RuntimeContext; + bool iss_RuntimeKeysReady; RelationPtr iss_RelationDescs; IndexScanDescPtr iss_ScanDescs; HeapTupleData iss_htup; -- cgit v1.2.1