diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-03-11 19:40:24 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-03-11 19:40:24 +0000 |
commit | 6261c75014c9948837d9d025493ef18b8f833f70 (patch) | |
tree | f7d75ca8cfa6a093d0fde2f707ae48e90ced7771 /src/backend/utils/mmgr/portalmem.c | |
parent | e4704001ea4c3d63b53e8783859ff598ef2f69e5 (diff) | |
download | postgresql-6261c75014c9948837d9d025493ef18b8f833f70.tar.gz postgresql-6261c75014c9948837d9d025493ef18b8f833f70.zip |
Implement SQL92-compatible FIRST, LAST, ABSOLUTE n, RELATIVE n options
for FETCH and MOVE.
Diffstat (limited to 'src/backend/utils/mmgr/portalmem.c')
-rw-r--r-- | src/backend/utils/mmgr/portalmem.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c index 654247dd8c5..66ee72718cf 100644 --- a/src/backend/utils/mmgr/portalmem.c +++ b/src/backend/utils/mmgr/portalmem.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.52 2003/03/10 03:53:51 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.53 2003/03/11 19:40:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -167,10 +167,12 @@ PortalSetQuery(Portal portal, AssertArg(PortalIsValid(portal)); portal->queryDesc = queryDesc; - portal->backwardOK = ExecSupportsBackwardScan(queryDesc->plantree); - portal->atStart = true; /* Allow fetch forward only, to start */ - portal->atEnd = false; portal->cleanup = cleanup; + portal->backwardOK = ExecSupportsBackwardScan(queryDesc->plantree); + portal->atStart = true; + portal->atEnd = false; /* allow fetches */ + portal->portalPos = 0; + portal->posOverflow = false; } /* @@ -211,10 +213,12 @@ CreatePortal(const char *name) /* initialize portal query */ portal->queryDesc = NULL; - portal->backwardOK = false; - portal->atStart = true; /* disallow fetches until query is set */ - portal->atEnd = true; portal->cleanup = NULL; + portal->backwardOK = false; + portal->atStart = true; + portal->atEnd = true; /* disallow fetches until query is set */ + portal->portalPos = 0; + portal->posOverflow = false; /* put portal in table */ PortalHashTableInsert(portal); |