From 2f35b4efdbec6c161ca9bd491d6345134910c425 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 26 Oct 2000 21:38:24 +0000 Subject: Re-implement LIMIT/OFFSET as a plan node type, instead of a hack in ExecutorRun. This allows LIMIT to work in a view. Also, LIMIT in a cursor declaration will behave in a reasonable fashion, whereas before it was overridden by the FETCH count. --- src/backend/executor/execAmi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/backend/executor/execAmi.c') diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c index 9d008494b3..cb47eda5c6 100644 --- a/src/backend/executor/execAmi.c +++ b/src/backend/executor/execAmi.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: execAmi.c,v 1.53 2000/10/05 19:11:26 tgl Exp $ + * $Id: execAmi.c,v 1.54 2000/10/26 21:35:15 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -37,6 +37,7 @@ #include "executor/nodeHashjoin.h" #include "executor/nodeIndexscan.h" #include "executor/nodeTidscan.h" +#include "executor/nodeLimit.h" #include "executor/nodeMaterial.h" #include "executor/nodeMergejoin.h" #include "executor/nodeNestloop.h" @@ -350,6 +351,10 @@ ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent) ExecReScanSetOp((SetOp *) node, exprCtxt, parent); break; + case T_Limit: + ExecReScanLimit((Limit *) node, exprCtxt, parent); + break; + case T_Sort: ExecReScanSort((Sort *) node, exprCtxt, parent); break; -- cgit v1.2.1