提交 b05dea17 编写于 作者: H Heikki Linnakangas

Remove unused functions.

上级 751b1325
......@@ -3581,97 +3581,3 @@ PQunescapeBytea(const unsigned char *strtext, size_t *retbuflen)
*retbuflen = buflen;
return tmpbuf;
}
int PQsendCreateGang(PGconn * conn, int size, void * binaryGangInfo)
{
char * query = "create gang";
if (!PQexecStart(conn))
return 0;
PQsendQueryStart(conn);
/* construct the outgoing Query message */
if (pqPutMsgStart('G', false, conn) < 0 ||
pqPuts(query, conn) < 0 ||
pqPutInt(size, 4, conn) < 0 ||
pqPutnchar(binaryGangInfo, size, conn) < 0 ||
pqPutMsgEnd(conn) < 0)
{
pqHandleSendFailure(conn);
return 0;
}
/* remember we are using simple query protocol */
conn->queryclass = PGQUERY_SIMPLE;
/* and remember the query text too, if possible */
/* if insufficient memory, last_query just winds up NULL */
if (conn->last_query)
free(conn->last_query);
conn->last_query = strdup(query);
/*
* Give the data a push. In nonblock mode, don't complain if we're unable
* to send it all; PQgetResult() will do any additional flushing needed.
*/
if (pqFlush(conn) < 0)
{
pqHandleSendFailure(conn);
return 0;
}
/* OK, it's launched! */
conn->asyncStatus = PGASYNC_BUSY;
return 1;
}
int PQsendControlGang(PGconn * conn, int gang_id, const char * query)
{
if (!PQexecStart(conn))
return 0;
PQsendQueryStart(conn);
/* construct the outgoing Query message */
if (pqPutMsgStart('G', false, conn) < 0 ||
pqPuts(query, conn) < 0 ||
pqPutInt(gang_id, 4, conn) < 0 ||
pqPutMsgEnd(conn) < 0)
{
pqHandleSendFailure(conn);
return 0;
}
/* remember we are using simple query protocol */
conn->queryclass = PGQUERY_SIMPLE;
/* and remember the query text too, if possible */
/* if insufficient memory, last_query just winds up NULL */
if (conn->last_query)
free(conn->last_query);
conn->last_query = strdup(query);
/*
* Give the data a push. In nonblock mode, don't complain if we're unable
* to send it all; PQgetResult() will do any additional flushing needed.
*/
if (pqFlush(conn) < 0)
{
pqHandleSendFailure(conn);
return 0;
}
/* OK, it's launched! */
conn->asyncStatus = PGASYNC_BUSY;
return 1;
}
......@@ -610,12 +610,6 @@ extern char *PQencryptPassword(const char *passwd, const char *user);
extern int pg_char_to_encoding(const char *name);
extern const char *pg_encoding_to_char(int encoding);
extern int pg_valid_server_encoding_id(int encoding);
/*
* special routine for sending gang management commands to dispatch agent
*/
extern int PQsendCreateGang(PGconn * conn, int size, void * binaryGangInfo);
extern int PQsendControlGang(PGconn * conn, int gang_id, const char * query);
#ifdef __cplusplus
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册