mirror of https://github.com/citusdata/citus.git
Rename some more foreach_ptr to foreach_declared_ptr
parent
c02d899b6c
commit
17b4122e84
|
@ -230,7 +230,7 @@ FilterDistributedDatabases(List *databases)
|
|||
{
|
||||
List *distributedDatabases = NIL;
|
||||
String *databaseName = NULL;
|
||||
foreach_ptr(databaseName, databases)
|
||||
foreach_declared_ptr(databaseName, databases)
|
||||
{
|
||||
bool missingOk = true;
|
||||
ObjectAddress *dbAddress =
|
||||
|
@ -253,7 +253,7 @@ static bool
|
|||
IsSetTablespaceStatement(AlterDatabaseStmt *stmt)
|
||||
{
|
||||
DefElem *def = NULL;
|
||||
foreach_ptr(def, stmt->options)
|
||||
foreach_declared_ptr(def, stmt->options)
|
||||
{
|
||||
if (strcmp(def->defname, "tablespace") == 0)
|
||||
{
|
||||
|
@ -500,7 +500,7 @@ PreprocessCreateDatabaseStmt(Node *node, const char *queryString,
|
|||
|
||||
List *remoteNodes = TargetWorkerSetNodeList(ALL_SHARD_NODES, RowShareLock);
|
||||
WorkerNode *remoteNode = NULL;
|
||||
foreach_ptr(remoteNode, remoteNodes)
|
||||
foreach_declared_ptr(remoteNode, remoteNodes)
|
||||
{
|
||||
InsertCleanupRecordOutsideTransaction(
|
||||
CLEANUP_OBJECT_DATABASE,
|
||||
|
@ -723,7 +723,7 @@ void
|
|||
EnsureSupportedCreateDatabaseCommand(CreatedbStmt *stmt)
|
||||
{
|
||||
DefElem *option = NULL;
|
||||
foreach_ptr(option, stmt->options)
|
||||
foreach_declared_ptr(option, stmt->options)
|
||||
{
|
||||
if (strcmp(option->defname, "oid") == 0)
|
||||
{
|
||||
|
|
|
@ -162,7 +162,7 @@ EnsureRequiredObjectSetExistOnAllNodes(const ObjectAddress *target,
|
|||
}
|
||||
|
||||
ObjectAddress *object = NULL;
|
||||
foreach_ptr(object, objectsToBeCreated)
|
||||
foreach_declared_ptr(object, objectsToBeCreated)
|
||||
{
|
||||
List *dependencyCommands = GetDependencyCreateDDLCommands(object);
|
||||
ddlCommands = list_concat(ddlCommands, dependencyCommands);
|
||||
|
|
|
@ -255,7 +255,7 @@ static void
|
|||
DropRoleStmtUnmarkDistOnLocalMainDb(DropRoleStmt *dropRoleStmt)
|
||||
{
|
||||
RoleSpec *roleSpec = NULL;
|
||||
foreach_ptr(roleSpec, dropRoleStmt->roles)
|
||||
foreach_declared_ptr(roleSpec, dropRoleStmt->roles)
|
||||
{
|
||||
Oid roleOid = get_role_oid(roleSpec->rolename,
|
||||
dropRoleStmt->missing_ok);
|
||||
|
|
|
@ -580,7 +580,7 @@ GenerateCreateOrAlterRoleCommand(Oid roleOid)
|
|||
*/
|
||||
List *secLabelOnRoleStmts = GenerateSecLabelOnRoleStmts(roleOid, rolename);
|
||||
stmt = NULL;
|
||||
foreach_ptr(stmt, secLabelOnRoleStmts)
|
||||
foreach_declared_ptr(stmt, secLabelOnRoleStmts)
|
||||
{
|
||||
completeRoleList = lappend(completeRoleList, DeparseTreeNode(stmt));
|
||||
}
|
||||
|
|
|
@ -1525,10 +1525,10 @@ NontransactionalNodeDDLTaskList(TargetWorkerSet targets, List *commands,
|
|||
{
|
||||
List *ddlJobs = NodeDDLTaskList(targets, commands);
|
||||
DDLJob *ddlJob = NULL;
|
||||
foreach_ptr(ddlJob, ddlJobs)
|
||||
foreach_declared_ptr(ddlJob, ddlJobs)
|
||||
{
|
||||
Task *task = NULL;
|
||||
foreach_ptr(task, ddlJob->taskList)
|
||||
foreach_declared_ptr(task, ddlJob->taskList)
|
||||
{
|
||||
task->cannotBeExecutedInTransaction = true;
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ static void
|
|||
AppendBasicAlterDatabaseOptions(StringInfo buf, AlterDatabaseStmt *stmt)
|
||||
{
|
||||
DefElem *def = NULL;
|
||||
foreach_ptr(def, stmt->options)
|
||||
foreach_declared_ptr(def, stmt->options)
|
||||
{
|
||||
DefElemOptionToStatement(buf, def, alterDatabaseOptionFormats, lengthof(
|
||||
alterDatabaseOptionFormats));
|
||||
|
@ -289,7 +289,7 @@ AppendCreateDatabaseStmt(StringInfo buf, CreatedbStmt *stmt)
|
|||
quote_identifier(stmt->dbname));
|
||||
|
||||
DefElem *option = NULL;
|
||||
foreach_ptr(option, stmt->options)
|
||||
foreach_declared_ptr(option, stmt->options)
|
||||
{
|
||||
DefElemOptionToStatement(buf, option, createDatabaseOptionFormats,
|
||||
lengthof(createDatabaseOptionFormats));
|
||||
|
|
|
@ -932,7 +932,7 @@ TryDropDatabaseOutsideTransaction(char *databaseName, char *nodeName, int nodePo
|
|||
bool executeCommand = true;
|
||||
|
||||
const char *commandString = NULL;
|
||||
foreach_ptr(commandString, commandList)
|
||||
foreach_declared_ptr(commandString, commandList)
|
||||
{
|
||||
/*
|
||||
* Cannot use SendOptionalCommandListToWorkerOutsideTransactionWithConnection()
|
||||
|
|
|
@ -109,7 +109,7 @@ IsMetadataSynced(void)
|
|||
List *workerList = ActivePrimaryNonCoordinatorNodeList(NoLock);
|
||||
|
||||
WorkerNode *workerNode = NULL;
|
||||
foreach_ptr(workerNode, workerList)
|
||||
foreach_declared_ptr(workerNode, workerList)
|
||||
{
|
||||
if (workerNode->hasMetadata && !workerNode->metadataSynced)
|
||||
{
|
||||
|
|
|
@ -193,7 +193,7 @@ void
|
|||
SendCommandListToRemoteNodesWithMetadata(List *commands)
|
||||
{
|
||||
char *command = NULL;
|
||||
foreach_ptr(command, commands)
|
||||
foreach_declared_ptr(command, commands)
|
||||
{
|
||||
SendCommandToRemoteNodesWithMetadata(command);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue