From 2e61c3e6b8b735fd2370ac77b061f0209ce7ee20 Mon Sep 17 00:00:00 2001 From: Burak Velioglu Date: Mon, 20 Dec 2021 15:44:01 +0300 Subject: [PATCH] Add todos --- src/backend/distributed/commands/dependencies.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backend/distributed/commands/dependencies.c b/src/backend/distributed/commands/dependencies.c index f7e021917..4969af549 100644 --- a/src/backend/distributed/commands/dependencies.c +++ b/src/backend/distributed/commands/dependencies.c @@ -58,14 +58,15 @@ EnsureDependenciesExistOnAllNodes(const ObjectAddress *target) /* collect all dependencies in creation order and get their ddl commands */ List *dependencies = GetDependenciesForObject(target); + + /* TODO: Might add check for PG (not Citus) tables */ + ObjectAddress *dependency = NULL; foreach_ptr(dependency, dependencies) { List *dependencyCommands = GetDependencyCreateDDLCommands(dependency); ddlCommands = list_concat(ddlCommands, dependencyCommands); - /* TODO: Might add check for tables */ - /* create a new list with dependencies that actually created commands */ if (list_length(dependencyCommands) > 0) { @@ -243,6 +244,7 @@ GetDependencyCreateDDLCommands(const ObjectAddress *dependency) if (IsCitusTable(relationId) && !IsTableOwnedByExtension(relationId)) { /* skip table metadata creation when the Citus table is owned by an extension */ + // TODO: Check sequence next val type List *commandList = NIL; List *tableDDLCommands = GetFullTableCreationCommands(relationId, WORKER_NEXTVAL_SEQUENCE_DEFAULTS); @@ -266,6 +268,7 @@ GetDependencyCreateDDLCommands(const ObjectAddress *dependency) if (relKind == RELKIND_SEQUENCE) { + // TODO: Check user name for different scenarios char *userName = GetUserNameFromId(GetUserId(), false); return DDLCommandsForSequence(dependency->objectId, userName); }