diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 12ee1c28f17328b254a3441dfddcb1d11e4796e3..6dd610cba2458ba51aeb0c9bece5a57ea6281f79 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.22 1997/03/12 20:47:32 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.23 1997/04/02 03:57:03 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -119,6 +119,8 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe, /* Above should not return. */ else { if (from) { /* copy from file to database */ + if ( rel->rd_rel->relkind == RELKIND_SEQUENCE ) + elog (WARN, "You can't change sequence relation %s", relname); if (pipe) { if (IsUnderPostmaster) { ReceiveCopyBegin(); diff --git a/src/backend/commands/creatinh.c b/src/backend/commands/creatinh.c index 88140241d1544f86d8beaca1ea3acdc95ec29868..696bd22e7c431ab30afaed9b178d0331078ed08a 100644 --- a/src/backend/commands/creatinh.c +++ b/src/backend/commands/creatinh.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.5 1997/01/10 20:17:11 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.6 1997/04/02 03:57:06 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -264,6 +264,11 @@ MergeAttributes(List *schema, List *supers) "MergeAttr: Can't inherit from non-existent superclass '%s'", name); } + if ( relation->rd_rel->relkind == 'S' ) + { + elog(WARN, "MergeAttr: Can't inherit from sequence superclass '%s'", + name); + } tupleDesc = RelationGetTupleDescriptor(relation); for (attrno = relation->rd_rel->relnatts - 1; attrno >= 0; attrno--) {