mirror of https://github.com/citusdata/citus.git
Rename DropAndMoveDefaultSequenceOwnerships
parent
93c3f30024
commit
53b1888cac
|
@ -68,7 +68,7 @@ static char * GetRenameShardTriggerCommand(Oid shardRelationId, char *triggerNam
|
||||||
static void DropRelationTruncateTriggers(Oid relationId);
|
static void DropRelationTruncateTriggers(Oid relationId);
|
||||||
static char * GetDropTriggerCommand(Oid relationId, char *triggerName);
|
static char * GetDropTriggerCommand(Oid relationId, char *triggerName);
|
||||||
static List * GetRenameStatsCommandList(List *statsOidList, uint64 shardId);
|
static List * GetRenameStatsCommandList(List *statsOidList, uint64 shardId);
|
||||||
static void DropAndMoveDefaultSequenceOwnerships(Oid sourceRelationId,
|
static void DropDefaultExpressionsAndMoveOwnedSequenceOwnerships(Oid sourceRelationId,
|
||||||
Oid targetRelationId);
|
Oid targetRelationId);
|
||||||
static void DropDefaultColumnDefinition(Oid relationId, char *columnName);
|
static void DropDefaultColumnDefinition(Oid relationId, char *columnName);
|
||||||
static void TransferSequenceOwnership(Oid ownedSequenceId, Oid targetRelationId,
|
static void TransferSequenceOwnership(Oid ownedSequenceId, Oid targetRelationId,
|
||||||
|
@ -309,7 +309,8 @@ CreateCitusLocalTable(Oid relationId, bool cascadeViaForeignKeys)
|
||||||
* DEFAULT expressions from shard relation as we should evaluate such columns
|
* DEFAULT expressions from shard relation as we should evaluate such columns
|
||||||
* in shell table when needed.
|
* in shell table when needed.
|
||||||
*/
|
*/
|
||||||
DropAndMoveDefaultSequenceOwnerships(shardRelationId, shellRelationId);
|
DropDefaultExpressionsAndMoveOwnedSequenceOwnerships(shardRelationId,
|
||||||
|
shellRelationId);
|
||||||
|
|
||||||
InsertMetadataForCitusLocalTable(shellRelationId, shardId);
|
InsertMetadataForCitusLocalTable(shellRelationId, shardId);
|
||||||
|
|
||||||
|
@ -883,13 +884,14 @@ GetRenameStatsCommandList(List *statsOidList, uint64 shardId)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DropAndMoveDefaultSequenceOwnerships drops default column definitions for
|
* DropDefaultExpressionsAndMoveOwnedSequenceOwnerships drops default column
|
||||||
* relation with sourceRelationId. Also, for each column that defaults to an
|
* definitions for relation with sourceRelationId. Also, for each column that
|
||||||
* owned sequence, it grants ownership to the same named column of the relation
|
* defaults to an owned sequence, it grants ownership to the same named column
|
||||||
* with targetRelationId.
|
* of the relation with targetRelationId.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
DropAndMoveDefaultSequenceOwnerships(Oid sourceRelationId, Oid targetRelationId)
|
DropDefaultExpressionsAndMoveOwnedSequenceOwnerships(Oid sourceRelationId,
|
||||||
|
Oid targetRelationId)
|
||||||
{
|
{
|
||||||
List *columnNameList = NIL;
|
List *columnNameList = NIL;
|
||||||
List *ownedSequenceIdList = NIL;
|
List *ownedSequenceIdList = NIL;
|
||||||
|
|
Loading…
Reference in New Issue