diff --git a/src/backend/distributed/commands/cluster.c b/src/backend/distributed/commands/cluster.c index d1dd313fe..f5dfc778f 100644 --- a/src/backend/distributed/commands/cluster.c +++ b/src/backend/distributed/commands/cluster.c @@ -14,9 +14,18 @@ #include "distributed/commands.h" #include "distributed/metadata_cache.h" +static List * PreprocessClusterStmt(Node *node, const char *clusterCommand); +static DistributeObjectOps Any_Cluster = { + .deparse = NULL, + .qualify = NULL, + .preprocess = PreprocessClusterStmt, + .postprocess = NULL, + .address = NULL, +}; +REGISTER_DISTRIBUTED_OPERATION(ClusterStmt, Any_Cluster); /* placeholder for PreprocessClusterStmt */ -List * +static List * PreprocessClusterStmt(Node *node, const char *clusterCommand) { ClusterStmt *clusterStmt = castNode(ClusterStmt, node); diff --git a/src/backend/distributed/commands/distribute_object_ops.c b/src/backend/distributed/commands/distribute_object_ops.c index ddfb05841..10966ecbb 100644 --- a/src/backend/distributed/commands/distribute_object_ops.c +++ b/src/backend/distributed/commands/distribute_object_ops.c @@ -23,15 +23,6 @@ static DistributeObjectOps NoDistributeOps = { .address = NULL, }; -static DistributeObjectOps Any_Cluster = { - .deparse = NULL, - .qualify = NULL, - .preprocess = PreprocessClusterStmt, - .postprocess = NULL, - .address = NULL, -}; -REGISTER_DISTRIBUTED_OPERATION(ClusterStmt, Any_Cluster); - static DistributeObjectOps Any_Index = { .deparse = NULL, .qualify = NULL, diff --git a/src/include/distributed/commands.h b/src/include/distributed/commands.h index ab1960541..6f2a8e471 100644 --- a/src/include/distributed/commands.h +++ b/src/include/distributed/commands.h @@ -121,9 +121,6 @@ typedef struct DistributedObjectOpsContainer const DistributeObjectOps * GetDistributeObjectOps(Node *node); -/* cluster.c - forward declarations */ -extern List * PreprocessClusterStmt(Node *node, const char *clusterCommand); - /* call.c */ extern bool CallDistributedProcedureRemotely(CallStmt *callStmt, DestReceiver *dest);