aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execProcnode.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-10-26 21:38:24 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-10-26 21:38:24 +0000
commit2f35b4efdbec6c161ca9bd491d6345134910c425 (patch)
tree2424351bcc12a8ddf2b716b28f53d2c37c79e507 /src/backend/executor/execProcnode.c
parentc9476bafdb1b97d0d21d92788f93298962145479 (diff)
downloadpostgresql-2f35b4efdbec6c161ca9bd491d6345134910c425.tar.gz
postgresql-2f35b4efdbec6c161ca9bd491d6345134910c425.zip
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.
Diffstat (limited to 'src/backend/executor/execProcnode.c')
-rw-r--r--src/backend/executor/execProcnode.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/backend/executor/execProcnode.c b/src/backend/executor/execProcnode.c
index 6269a7caa10..d7db099653d 100644
--- a/src/backend/executor/execProcnode.c
+++ b/src/backend/executor/execProcnode.c
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.21 2000/10/05 19:11:26 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.22 2000/10/26 21:35:15 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -83,6 +83,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"
@@ -204,6 +205,10 @@ ExecInitNode(Plan *node, EState *estate, Plan *parent)
result = ExecInitSetOp((SetOp *) node, estate, parent);
break;
+ case T_Limit:
+ result = ExecInitLimit((Limit *) node, estate, parent);
+ break;
+
case T_Group:
result = ExecInitGroup((Group *) node, estate, parent);
break;
@@ -331,6 +336,10 @@ ExecProcNode(Plan *node, Plan *parent)
result = ExecSetOp((SetOp *) node);
break;
+ case T_Limit:
+ result = ExecLimit((Limit *) node);
+ break;
+
case T_Group:
result = ExecGroup((Group *) node);
break;
@@ -413,6 +422,9 @@ ExecCountSlotsNode(Plan *node)
case T_SetOp:
return ExecCountSlotsSetOp((SetOp *) node);
+ case T_Limit:
+ return ExecCountSlotsLimit((Limit *) node);
+
case T_Group:
return ExecCountSlotsGroup((Group *) node);
@@ -535,6 +547,10 @@ ExecEndNode(Plan *node, Plan *parent)
ExecEndSetOp((SetOp *) node);
break;
+ case T_Limit:
+ ExecEndLimit((Limit *) node);
+ break;
+
case T_Group:
ExecEndGroup((Group *) node);
break;