mirror of https://github.com/citusdata/citus.git
Fixes indentation
parent
a37e542ba8
commit
73685aa6d6
|
@ -23,7 +23,7 @@ static char * GetCommentForObject(Oid oid);
|
||||||
|
|
||||||
|
|
||||||
List *
|
List *
|
||||||
GetCommentPropagationCommands(Oid oid,char *objectName, ObjectType objectType)
|
GetCommentPropagationCommands(Oid oid, char *objectName, ObjectType objectType)
|
||||||
{
|
{
|
||||||
List *commands = NIL;
|
List *commands = NIL;
|
||||||
|
|
||||||
|
@ -36,11 +36,13 @@ GetCommentPropagationCommands(Oid oid,char *objectName, ObjectType objectType)
|
||||||
/* Create the SQL command to propagate the comment to other nodes */
|
/* Create the SQL command to propagate the comment to other nodes */
|
||||||
if (comment == NULL)
|
if (comment == NULL)
|
||||||
{
|
{
|
||||||
appendStringInfo(commentStmt, "COMMENT ON %s %s IS NULL;", commentObjectType, quote_identifier(objectName));
|
appendStringInfo(commentStmt, "COMMENT ON %s %s IS NULL;", commentObjectType,
|
||||||
|
quote_identifier(objectName));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
appendStringInfo(commentStmt, "COMMENT ON %s %s IS %s;", commentObjectType, quote_identifier(objectName),
|
appendStringInfo(commentStmt, "COMMENT ON %s %s IS %s;", commentObjectType,
|
||||||
|
quote_identifier(objectName),
|
||||||
quote_literal_cstr(comment));
|
quote_literal_cstr(comment));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,17 +53,23 @@ GetCommentPropagationCommands(Oid oid,char *objectName, ObjectType objectType)
|
||||||
return commands;
|
return commands;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char * GetCommentObjectType(ObjectType objectType){
|
|
||||||
|
static char *
|
||||||
|
GetCommentObjectType(ObjectType objectType)
|
||||||
|
{
|
||||||
char *objectName = NULL;
|
char *objectName = NULL;
|
||||||
for(int i = 0; i < sizeof(commentStmtTypes)/sizeof(CommentStmtType); i++){
|
for (int i = 0; i < sizeof(commentStmtTypes) / sizeof(CommentStmtType); i++)
|
||||||
if(commentStmtTypes[i].objectType == objectType){
|
{
|
||||||
objectName = commentStmtTypes[i].objectName;
|
if (commentStmtTypes[i].objectType == objectType)
|
||||||
|
{
|
||||||
|
objectName = commentStmtTypes[i].objectName;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return objectName;
|
return objectName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
GetCommentForObject(Oid oid)
|
GetCommentForObject(Oid oid)
|
||||||
{
|
{
|
||||||
|
@ -100,7 +108,6 @@ GetCommentForObject(Oid oid)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End the scan and close the catalog */
|
/* End the scan and close the catalog */
|
||||||
|
|
|
@ -9,4 +9,5 @@ typedef struct CommentStmtType
|
||||||
} CommentStmtType;
|
} CommentStmtType;
|
||||||
|
|
||||||
|
|
||||||
extern List * GetCommentPropagationCommands(Oid oid, char *objectName, ObjectType objectType);
|
extern List * GetCommentPropagationCommands(Oid oid, char *objectName, ObjectType
|
||||||
|
objectType);
|
||||||
|
|
Loading…
Reference in New Issue