mirror of https://github.com/citusdata/citus.git
create_distributed_table with fk to ref table is implemented
parent
2fa4e38841
commit
45f8017f42
|
@ -668,6 +668,13 @@ WorkerCreateShard(Oid relationId, int shardIndex, uint64 shardId, List *ddlComma
|
||||||
{
|
{
|
||||||
referencedShardId = shardId;
|
referencedShardId = shardId;
|
||||||
}
|
}
|
||||||
|
else if (PartitionMethod(referencedRelationId) == DISTRIBUTE_BY_NONE)
|
||||||
|
{
|
||||||
|
List *shardList = LoadShardList(referencedRelationId);
|
||||||
|
uint64 *shardIdPointer = (uint64 *) linitial(shardList);
|
||||||
|
|
||||||
|
referencedShardId = (*shardIdPointer);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
referencedShardId = ColocatedShardIdInRelation(referencedRelationId,
|
referencedShardId = ColocatedShardIdInRelation(referencedRelationId,
|
||||||
|
|
Loading…
Reference in New Issue