mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Added LIMIT/OFFSET functionality including new regression test for it.
Removed CURRENT keyword for rule queries and changed rules regression accordingly. CURRENT has beed announced to disappear in v6.5. Jan
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.19 1998/09/02 23:05:34 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.20 1999/02/08 14:14:14 wieck Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -40,7 +40,8 @@
|
||||
#include "commands/command.h"
|
||||
|
||||
static char *CreateOperationTag(int operationType);
|
||||
static void ProcessQueryDesc(QueryDesc *queryDesc);
|
||||
static void ProcessQueryDesc(QueryDesc *queryDesc, Node *limoffset,
|
||||
Node *limcount);
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
@@ -205,7 +206,7 @@ ProcessPortal(char *portalName,
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
ProcessQueryDesc(QueryDesc *queryDesc)
|
||||
ProcessQueryDesc(QueryDesc *queryDesc, Node *limoffset, Node *limcount)
|
||||
{
|
||||
Query *parseTree;
|
||||
Plan *plan;
|
||||
@@ -330,7 +331,7 @@ ProcessQueryDesc(QueryDesc *queryDesc)
|
||||
* actually run the plan..
|
||||
* ----------------
|
||||
*/
|
||||
ExecutorRun(queryDesc, state, EXEC_RUN, 0);
|
||||
ExecutorRun(queryDesc, state, EXEC_RUN, limoffset, limcount);
|
||||
|
||||
/* save infos for EndCommand */
|
||||
UpdateCommandInfo(operation, state->es_lastoid, state->es_processed);
|
||||
@@ -373,5 +374,6 @@ ProcessQuery(Query *parsetree,
|
||||
print_plan(plan, parsetree);
|
||||
}
|
||||
else
|
||||
ProcessQueryDesc(queryDesc);
|
||||
ProcessQueryDesc(queryDesc, parsetree->limitOffset,
|
||||
parsetree->limitCount);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user