diff options
author | Jan Wieck <JanWieck@Yahoo.com> | 1999-02-08 14:14:32 +0000 |
---|---|---|
committer | Jan Wieck <JanWieck@Yahoo.com> | 1999-02-08 14:14:32 +0000 |
commit | be948af2e81d44290a15a0b8614fdd209924f698 (patch) | |
tree | 7ea39a552a8cb96e2740a814de3bab7e2b0e04ee /src/backend/commands/command.c | |
parent | 54e5d256664ece2cb180f4d5a278397906fe5988 (diff) | |
download | postgresql-be948af2e81d44290a15a0b8614fdd209924f698.tar.gz |
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
Diffstat (limited to 'src/backend/commands/command.c')
-rw-r--r-- | src/backend/commands/command.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c index 1a65f4d4d0..310325d2f8 100644 --- a/src/backend/commands/command.c +++ b/src/backend/commands/command.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.36 1999/02/03 21:16:02 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.37 1999/02/08 14:14:08 wieck Exp $ * * NOTES * The PortalExecutorHeapMemory crap needs to be eliminated @@ -40,6 +40,7 @@ #include "utils/portal.h" #include "utils/syscache.h" #include "miscadmin.h" +#include "string.h" /* ---------------- * PortalExecutorHeapMemory stuff @@ -102,6 +103,7 @@ PerformPortalFetch(char *name, int feature; QueryDesc *queryDesc; MemoryContext context; + Const limcount; /* ---------------- * sanity checks @@ -114,6 +116,21 @@ PerformPortalFetch(char *name, } /* ---------------- + * Create a const node from the given count value + * ---------------- + */ + memset(&limcount, 0, sizeof(limcount)); + limcount.type = T_Const; + limcount.consttype = INT4OID; + limcount.constlen = sizeof(int4); + limcount.constvalue = (Datum)count; + limcount.constisnull = FALSE; + limcount.constbyval = TRUE; + limcount.constisset = FALSE; + limcount.constiscast = FALSE; + + + /* ---------------- * get the portal from the portal name * ---------------- */ @@ -176,7 +193,8 @@ PerformPortalFetch(char *name, PortalExecutorHeapMemory = (MemoryContext) PortalGetHeapMemory(portal); - ExecutorRun(queryDesc, PortalGetState(portal), feature, count); + ExecutorRun(queryDesc, PortalGetState(portal), feature, + (Node *)NULL, (Node *)&limcount); if (dest == None) /* MOVE */ pfree(queryDesc); |