PGconn *pgsql;
PGresult *res;
int leftover = 0;
+ int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs",
&pgsql_link, &query, &len) == FAILURE) {
RETURN_FALSE;
}
}
+ /* Wait to finish sending buffer */
+ while ((ret = PQflush(pgsql))) {
+ if (ret == -1) {
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Could not empty PostgreSQL send buffer");
+ break;
+ }
+ usleep(10000);
+ }
if (PQ_SETNONBLOCKING(pgsql, 0)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Cannot set connection to blocking mode");
}
PGconn *pgsql;
PGresult *res;
int leftover = 0;
+ int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsa/", &pgsql_link, &query, &query_len, &pv_param_arr) == FAILURE) {
return;
}
}
_php_pgsql_free_params(params, num_params);
+ /* Wait to finish sending buffer */
+ while ((ret = PQflush(pgsql))) {
+ if (ret == -1) {
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Could not empty PostgreSQL send buffer");
+ break;
+ }
+ usleep(10000);
+ }
if (PQ_SETNONBLOCKING(pgsql, 0)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Cannot set connection to blocking mode");
}
PGconn *pgsql;
PGresult *res;
int leftover = 0;
+ int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rss", &pgsql_link, &stmtname, &stmtname_len, &query, &query_len) == FAILURE) {
return;
RETURN_FALSE;
}
}
+ /* Wait to finish sending buffer */
+ while ((ret = PQflush(pgsql))) {
+ if (ret == -1) {
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Could not empty postgres send buffer");
+ break;
+ }
+ usleep(10000);
+ }
if (PQ_SETNONBLOCKING(pgsql, 0)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Cannot set connection to blocking mode");
}
PGconn *pgsql;
PGresult *res;
int leftover = 0;
+ int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsa", &pgsql_link, &stmtname, &stmtname_len, &pv_param_arr) == FAILURE) {
return;
}
}
_php_pgsql_free_params(params, num_params);
+ /* Wait to finish sending buffer */
+ while ((ret = PQflush(pgsql))) {
+ if (ret == -1) {
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Could not empty postgres send buffer");
+ break;
+ }
+ usleep(10000);
+ }
if (PQ_SETNONBLOCKING(pgsql, 0)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Cannot set connection to blocking mode");
}