mirror of https://github.com/citusdata/citus.git
not append ; if end of the list in StringJoin (#3672)
parent
67d2ad4e37
commit
8dfc2cb122
|
@ -165,11 +165,16 @@ StringJoin(List *stringList, char delimiter)
|
|||
StringInfo joinedString = makeStringInfo();
|
||||
|
||||
const char *command = NULL;
|
||||
int curIndex = 0;
|
||||
foreach_ptr(command, stringList)
|
||||
{
|
||||
appendStringInfoString(joinedString, command);
|
||||
if (curIndex > 0)
|
||||
{
|
||||
appendStringInfoChar(joinedString, delimiter);
|
||||
}
|
||||
appendStringInfoString(joinedString, command);
|
||||
curIndex++;
|
||||
}
|
||||
|
||||
return joinedString->data;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue