Disallow CLOSE of reserved system portal names.
authorTom Lane
Sun, 4 Jun 2000 22:04:32 +0000 (22:04 +0000)
committerTom Lane
Sun, 4 Jun 2000 22:04:32 +0000 (22:04 +0000)
src/backend/commands/command.c

index 52011263dd128f941d8471d0cc64398b4d3da395..38cee644b2217341480c41b08ef9ef6afe5c50a6 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.76 2000/05/30 06:22:44 inoue Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.77 2000/06/04 22:04:32 tgl Exp $
  *
  * NOTES
  *   The PortalExecutorHeapMemory crap needs to be eliminated
@@ -234,6 +234,11 @@ PerformPortalClose(char *name, CommandDest dest)
        return;
    }
 
+   if (PortalNameIsSpecial(name))
+       elog(ERROR,
+            "The portal name \"%s\" is reserved for internal use",
+            name);
+
    /* ----------------
     *  get the portal from the portal name
     * ----------------