diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-05-02 20:54:36 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-05-02 20:54:36 +0000 |
| commit | de28dc9a04c4df5d711815b7a518501b43535a26 (patch) | |
| tree | 1b93363ece14ded804195ff4a1c754a9b4a32306 /src/include/tcop | |
| parent | 1940434f1ef8475c8b59bb8ff03e3f3a10cac6ae (diff) | |
| download | postgresql-de28dc9a04c4df5d711815b7a518501b43535a26.tar.gz | |
Portal and memory management infrastructure for extended query protocol.
Both plannable queries and utility commands are now always executed
within Portals, which have been revamped so that they can handle the
load (they used to be good only for single SELECT queries). Restructure
code to push command-completion-tag selection logic out of postgres.c,
so that it won't have to be duplicated between simple and extended queries.
initdb forced due to addition of a field to Query nodes.
Diffstat (limited to 'src/include/tcop')
| -rw-r--r-- | src/include/tcop/pquery.h | 23 | ||||
| -rw-r--r-- | src/include/tcop/tcopprot.h | 3 | ||||
| -rw-r--r-- | src/include/tcop/utility.h | 4 |
3 files changed, 24 insertions, 6 deletions
diff --git a/src/include/tcop/pquery.h b/src/include/tcop/pquery.h index c992306a9a..bf3344d2bd 100644 --- a/src/include/tcop/pquery.h +++ b/src/include/tcop/pquery.h @@ -7,17 +7,32 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pquery.h,v 1.24 2003/03/10 03:53:52 tgl Exp $ + * $Id: pquery.h,v 1.25 2003/05/02 20:54:36 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef PQUERY_H #define PQUERY_H -#include "executor/execdesc.h" +#include "utils/portal.h" -extern void ProcessQuery(Query *parsetree, Plan *plan, CommandDest dest, - char *completionTag); +extern void ProcessQuery(Query *parsetree, + Plan *plan, + ParamListInfo params, + const char *portalName, + CommandDest dest, + char *completionTag); + +extern void PortalStart(Portal portal, ParamListInfo params); + +extern bool PortalRun(Portal portal, long count, + CommandDest dest, CommandDest altdest, + char *completionTag); + +extern long PortalRunFetch(Portal portal, + FetchDirection fdirection, + long count, + CommandDest dest); #endif /* PQUERY_H */ diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h index b81df05320..c1fa9c1a6d 100644 --- a/src/include/tcop/tcopprot.h +++ b/src/include/tcop/tcopprot.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: tcopprot.h,v 1.55 2003/04/29 22:13:11 tgl Exp $ + * $Id: tcopprot.h,v 1.56 2003/05/02 20:54:36 tgl Exp $ * * OLD COMMENTS * This file was created so that other c files could get the two @@ -41,6 +41,7 @@ extern List *pg_analyze_and_rewrite(Node *parsetree, extern List *pg_parse_and_rewrite(const char *query_string, Oid *paramTypes, int numParams); extern Plan *pg_plan_query(Query *querytree); +extern List *pg_plan_queries(List *querytrees, bool needSnapshot); #endif /* BOOTSTRAP_INCLUDE */ diff --git a/src/include/tcop/utility.h b/src/include/tcop/utility.h index 9cca85415f..96c0dc43c5 100644 --- a/src/include/tcop/utility.h +++ b/src/include/tcop/utility.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: utility.h,v 1.16 2002/09/04 20:31:45 momjian Exp $ + * $Id: utility.h,v 1.17 2003/05/02 20:54:36 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,4 +19,6 @@ extern void ProcessUtility(Node *parsetree, CommandDest dest, char *completionTag); +extern const char *CreateCommandTag(Node *parsetree); + #endif /* UTILITY_H */ |
