mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Tom Lane wrote:
> There's no longer a separate call to heap_storage_create in that routine > --- the right place to make the test is now in the storage_create > boolean parameter being passed to heap_create. A simple change, but > it passeth patch's understanding ... Thanks. Attached is a patch against cvs tip as of 8:30 PM PST or so. Turned out that even after fixing the failed hunks, there was a new spot in bufmgr.c which needed to be fixed (related to temp relations; RelationUpdateNumberOfBlocks). But thankfully the regression test code caught it :-) Joe Conway
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.162 2002/08/02 18:15:06 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.163 2002/08/15 16:36:02 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -398,6 +398,9 @@ DoCopy(const CopyStmt *stmt)
|
||||
if (rel->rd_rel->relkind == RELKIND_VIEW)
|
||||
elog(ERROR, "You cannot copy view %s",
|
||||
RelationGetRelationName(rel));
|
||||
else if (rel->rd_rel->relkind == RELKIND_COMPOSITE_TYPE)
|
||||
elog(ERROR, "You cannot copy type relation %s",
|
||||
RelationGetRelationName(rel));
|
||||
else if (rel->rd_rel->relkind == RELKIND_SEQUENCE)
|
||||
elog(ERROR, "You cannot change sequence relation %s",
|
||||
RelationGetRelationName(rel));
|
||||
@ -443,6 +446,9 @@ DoCopy(const CopyStmt *stmt)
|
||||
if (rel->rd_rel->relkind == RELKIND_VIEW)
|
||||
elog(ERROR, "You cannot copy view %s",
|
||||
RelationGetRelationName(rel));
|
||||
else if (rel->rd_rel->relkind == RELKIND_COMPOSITE_TYPE)
|
||||
elog(ERROR, "You cannot copy type relation %s",
|
||||
RelationGetRelationName(rel));
|
||||
else if (rel->rd_rel->relkind == RELKIND_SEQUENCE)
|
||||
elog(ERROR, "You cannot copy sequence %s",
|
||||
RelationGetRelationName(rel));
|
||||
|
Reference in New Issue
Block a user