mirror of https://github.com/citusdata/citus.git
Convert TableDDLCommandList function to the new connection API
parent
0aa9572e18
commit
d7b68e5647
|
@ -996,11 +996,20 @@ TableDDLCommandList(const char *nodeName, uint32 nodePort, const char *tableName
|
||||||
{
|
{
|
||||||
List *ddlCommandList = NIL;
|
List *ddlCommandList = NIL;
|
||||||
StringInfo queryString = NULL;
|
StringInfo queryString = NULL;
|
||||||
|
MultiConnection *connection = NULL;
|
||||||
|
PGresult *result = NULL;
|
||||||
|
uint32 connectionFlag = FORCE_NEW_CONNECTION;
|
||||||
|
|
||||||
queryString = makeStringInfo();
|
queryString = makeStringInfo();
|
||||||
appendStringInfo(queryString, GET_TABLE_DDL_EVENTS, tableName);
|
appendStringInfo(queryString, GET_TABLE_DDL_EVENTS, tableName);
|
||||||
|
connection = GetNodeConnection(connectionFlag, nodeName, nodePort);
|
||||||
|
|
||||||
|
ExecuteOptionalRemoteCommand(connection, queryString->data, &result);
|
||||||
|
ddlCommandList = ReadFirstColumnAsText(result);
|
||||||
|
|
||||||
|
ForgetResults(connection);
|
||||||
|
CloseConnection(connection);
|
||||||
|
|
||||||
ddlCommandList = ExecuteRemoteQuery(nodeName, nodePort, NULL, queryString);
|
|
||||||
return ddlCommandList;
|
return ddlCommandList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue