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

Change warnings for non-existing or pre-existing cursors to errors.

This commit is contained in:
Peter Eisentraut
2003-08-24 21:02:43 +00:00
parent c3664c0c00
commit 693aad413b
6 changed files with 21 additions and 27 deletions

View File

@@ -12,7 +12,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.61 2003/08/04 02:40:08 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.62 2003/08/24 21:02:43 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -167,11 +167,11 @@ CreatePortal(const char *name, bool allowDup, bool dupSilent)
if (!allowDup)
ereport(ERROR,
(errcode(ERRCODE_DUPLICATE_CURSOR),
errmsg("portal \"%s\" already exists", name)));
errmsg("cursor \"%s\" already exists", name)));
if (!dupSilent)
ereport(WARNING,
(errcode(ERRCODE_DUPLICATE_CURSOR),
errmsg("closing pre-existing portal \"%s\"",
errmsg("closing existing cursor \"%s\"",
name)));
PortalDrop(portal, false);
}