[Patch] change the return value of PQsendFlushRequest

Поиск
Список
Период
Сортировка
Искать

[Patch] change the return value of PQsendFlushRequest

От:
"zhangjie2@fujitsu.com" <zhangjie2@fujitsu.com>
Дата:
Вложения:
Hi all

The return value of function PQsendFlushRequest is 1 or 0.
-------------------------------------------------------------------

    Sends a request for the server to flush its output buffer.

int PQsendFlushRequest(PGconn *conn);




    Returns 1 for success.  Returns 0 on any failure.

---------------------------------------------------------------------
But in the following code, false is returned.
I think it would be better to change to 0.

int PQsendFlushRequest(PGconn *conn)
{
......
	if (conn->asyncStatus != PGASYNC_IDLE &&
		conn->pipelineStatus == PQ_PIPELINE_OFF)
	{
		appendPQExpBufferStr(&conn->errorMessage,
							 libpq_gettext("another command is already in progress\n"));
		return false;  ※
	}
......
}

Best Regards!
Zhangjie

FAQ