1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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.
This commit is contained in:
Tom Lane
2000-10-26 21:38:24 +00:00
parent c9476bafdb
commit 2f35b4efdb
26 changed files with 572 additions and 232 deletions

View File

@ -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;