Fixes the table used in the error message (#4449)

pull/4450/head^2
Halil Ozan Akgül 2020-12-25 16:48:50 +03:00 committed by GitHub
parent b9cd91ef08
commit a8626d1944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -280,7 +280,7 @@ PostprocessAlterTableStmtAttachPartition(AlterTableStmt *alterTableStatement,
if (!IsCitusTable(relationId) &&
IsCitusTable(partitionRelationId))
{
char *parentRelationName = get_rel_name(partitionRelationId);
char *parentRelationName = get_rel_name(relationId);
ereport(ERROR, (errmsg("non-distributed tables cannot have "
"distributed partitions"),

View File

@ -295,7 +295,7 @@ SELECT create_distributed_table('partitioning_test_failure_2009', 'id');
ALTER TABLE partitioning_test_failure ATTACH PARTITION partitioning_test_failure_2009 FOR VALUES FROM ('2009-01-01') TO ('2010-01-01');
ERROR: non-distributed tables cannot have distributed partitions
HINT: Distribute the partitioned table "partitioning_test_failure_2009" instead
HINT: Distribute the partitioned table "partitioning_test_failure" instead
-- multi-level partitioning is not allowed
DROP TABLE partitioning_test_failure_2009;
CREATE TABLE partitioning_test_failure_2009 PARTITION OF partitioning_test_failure FOR VALUES FROM ('2009-01-01') TO ('2010-01-01') PARTITION BY RANGE (time);