diff options
| author | Tom Lane | 2000-04-04 21:44:40 +0000 |
|---|---|---|
| committer | Tom Lane | 2000-04-04 21:44:40 +0000 |
| commit | 708f82f1916073ae9e7eafb661f68c19e3d65797 (patch) | |
| tree | 6347172ace7ed49d871ecba227543c942465b398 /src/include/tcop | |
| parent | 30d4f58256c89b60f1ee7c4880e628145a531801 (diff) | |
Fix bug noted by Bruce: FETCH in an already-aborted transaction block
would crash, due to premature invocation of SetQuerySnapshot(). Clean
up problems with handling of multiple queries by splitting
pg_parse_and_plan into two routines. The old code would not, for
example, do the right thing with END; SELECT... submitted in one query
string when it had been in transaction abort state, because it'd decide
to skip planning the SELECT before it had executed the END. New
arrangement is simpler and doesn't force caller to plan if only
parse+rewrite is needed.
Diffstat (limited to 'src/include/tcop')
| -rw-r--r-- | src/include/tcop/tcopprot.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h index 283e517ccce..8255770068f 100644 --- a/src/include/tcop/tcopprot.h +++ b/src/include/tcop/tcopprot.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: tcopprot.h,v 1.25 2000/02/20 14:28:28 petere Exp $ + * $Id: tcopprot.h,v 1.26 2000/04/04 21:44:37 tgl Exp $ * * OLD COMMENTS * This file was created so that other c files could get the two @@ -29,12 +29,15 @@ extern bool InError; extern bool ExitAfterAbort; #ifndef BOOTSTRAP_INCLUDE -extern List *pg_parse_and_plan(char *query_string, Oid *typev, int nargs, - List **queryListP, CommandDest dest, - bool aclOverride); + +extern List *pg_parse_and_rewrite(char *query_string, + Oid *typev, int nargs, + bool aclOverride); +extern Plan *pg_plan_query(Query *querytree); extern void pg_exec_query_acl_override(char *query_string); -extern void - pg_exec_query_dest(char *query_string, CommandDest dest, bool aclOverride); +extern void pg_exec_query_dest(char *query_string, + CommandDest dest, + bool aclOverride); #endif /* BOOTSTRAP_INCLUDE */ |
