1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Put back error test for DECLARE CURSOR outside a transaction block ...

but do it correctly now.
This commit is contained in:
Tom Lane
2002-11-18 01:17:39 +00:00
parent 810f2cfa32
commit 17ac74797a
3 changed files with 50 additions and 3 deletions

View File

@@ -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)
{