diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-11-18 01:17:39 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-11-18 01:17:39 +0000 |
commit | 17ac74797a12e85741436d27cd4ac6337a806c44 (patch) | |
tree | 2944d316fa5b335d212e136072754472e59c6c8b /src/backend/tcop | |
parent | 810f2cfa3298e6535631eb4ea1b42fc83f253b1d (diff) | |
download | postgresql-17ac74797a12e85741436d27cd4ac6337a806c44.tar.gz postgresql-17ac74797a12e85741436d27cd4ac6337a806c44.zip |
Put back error test for DECLARE CURSOR outside a transaction block ...
but do it correctly now.
Diffstat (limited to 'src/backend/tcop')
-rw-r--r-- | src/backend/tcop/pquery.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index 29909295f51..0919b03f45a 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.55 2002/09/04 20:31:26 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.56 2002/11/18 01:17:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -161,6 +161,8 @@ ProcessQuery(Query *parsetree, /* If binary portal, switch to alternate output format */ if (dest == Remote && parsetree->isBinary) dest = RemoteInternal; + /* Check for invalid context (must be in transaction block) */ + RequireTransactionChain((void *) parsetree, "DECLARE CURSOR"); } else if (parsetree->into != NULL) { |