88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/backend/executor/nodeLimit.c,v 1.6 2001/03/23 04:49:53 momjian Exp $
11+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeLimit.c,v 1.7 2001/08/06 18:05:07 tgl Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -164,10 +164,11 @@ recompute_limits(Limit *node)
164164
165165if (node -> limitOffset )
166166{
167- limitstate -> offset = DatumGetInt32 (ExecEvalExpr (node -> limitOffset ,
168- econtext ,
169- & isNull ,
170- NULL ));
167+ limitstate -> offset =
168+ DatumGetInt32 (ExecEvalExprSwitchContext (node -> limitOffset ,
169+ econtext ,
170+ & isNull ,
171+ NULL ));
171172/* Interpret NULL offset as no offset */
172173if (isNull )
173174limitstate -> offset = 0 ;
@@ -182,10 +183,11 @@ recompute_limits(Limit *node)
182183
183184if (node -> limitCount )
184185{
185- limitstate -> count = DatumGetInt32 (ExecEvalExpr (node -> limitCount ,
186- econtext ,
187- & isNull ,
188- NULL ));
186+ limitstate -> count =
187+ DatumGetInt32 (ExecEvalExprSwitchContext (node -> limitCount ,
188+ econtext ,
189+ & isNull ,
190+ NULL ));
189191/* Interpret NULL count as no count (LIMIT ALL) */
190192if (isNull )
191193limitstate -> noCount = true;