Commit e276d8a1 authored by Vadim B. Mikheev's avatar Vadim B. Mikheev

Can't COPY TO sequence relation.

Can't inherits from ...
parent e8647c45
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* *
* IDENTIFICATION * 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, ...@@ -119,6 +119,8 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
/* Above should not return. */ /* Above should not return. */
else { else {
if (from) { /* copy from file to database */ 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 (pipe) {
if (IsUnderPostmaster) { if (IsUnderPostmaster) {
ReceiveCopyBegin(); ReceiveCopyBegin();
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -264,6 +264,11 @@ MergeAttributes(List *schema, List *supers)
"MergeAttr: Can't inherit from non-existent superclass '%s'", "MergeAttr: Can't inherit from non-existent superclass '%s'",
name); name);
} }
if ( relation->rd_rel->relkind == 'S' )
{
elog(WARN, "MergeAttr: Can't inherit from sequence superclass '%s'",
name);
}
tupleDesc = RelationGetTupleDescriptor(relation); tupleDesc = RelationGetTupleDescriptor(relation);
for (attrno = relation->rd_rel->relnatts - 1; attrno >= 0; attrno--) { for (attrno = relation->rd_rel->relnatts - 1; attrno >= 0; attrno--) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment