]> granicus.if.org Git - postgresql/commitdiff
Can't INSERT/UPDATE/DELETE sequence relation.
authorVadim B. Mikheev <vadim4o@yahoo.com>
Wed, 2 Apr 1997 04:04:11 +0000 (04:04 +0000)
committerVadim B. Mikheev <vadim4o@yahoo.com>
Wed, 2 Apr 1997 04:04:11 +0000 (04:04 +0000)
src/backend/executor/execMain.c

index cff5081c3744ee13adc6973654684133cd76719a..6d513b6a1d636b9cab679baf40fd0c0604e894ea 100644 (file)
@@ -26,7 +26,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.11 1997/03/12 20:47:41 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.12 1997/04/02 04:04:11 vadim Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -419,6 +419,10 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate)
        resultRelationOid =   rtentry->relid;
        resultRelationDesc =  heap_open(resultRelationOid);
        
+       if ( resultRelationDesc->rd_rel->relkind == RELKIND_SEQUENCE )
+           elog (WARN, "You can't change sequence relation %s",
+                       resultRelationDesc->rd_rel->relname.data);
+
        /* Write-lock the result relation right away: if the relation
           is used in a subsequent scan, we won't have to elevate the 
           read-lock set by heap_beginscan to a write-lock (needed by