From: Vadim B. Mikheev Date: Wed, 2 Apr 1997 04:04:11 +0000 (+0000) Subject: Can't INSERT/UPDATE/DELETE sequence relation. X-Git-Tag: REL6_1~393 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41aeed43344d6f8ddca96bdda120ec482c750747;p=postgresql Can't INSERT/UPDATE/DELETE sequence relation. --- diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index cff5081c37..6d513b6a1d 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -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