Lines Matching refs:pgsql

92 ZEND_DECLARE_MODULE_GLOBALS(pgsql)
93 static PHP_GINIT_FUNCTION(pgsql);
759 PHP_MINIT(pgsql),
760 PHP_MSHUTDOWN(pgsql),
761 PHP_RINIT(pgsql),
762 PHP_RSHUTDOWN(pgsql),
763 PHP_MINFO(pgsql),
765 PHP_MODULE_GLOBALS(pgsql),
766 PHP_GINIT(pgsql),
777 ZEND_GET_MODULE(pgsql)
899 static inline char * _php_pgsql_trim_result(PGconn * pgsql, char **buf) in _php_pgsql_trim_result() argument
901 return *buf = _php_pgsql_trim_message(PQerrorMessage(pgsql), NULL); in _php_pgsql_trim_result()
905 #define PQErrorMessageTrim(pgsql, buf) _php_pgsql_trim_result(pgsql, buf) argument
907 #define PHP_PQ_ERROR(text, pgsql) { \ argument
908 char *msgbuf = _php_pgsql_trim_message(PQerrorMessage(pgsql), NULL); \
1092 static PHP_GINIT_FUNCTION(pgsql) in PHP_INI_END()
1106 PHP_MINIT_FUNCTION(pgsql) in PHP_MINIT_FUNCTION() argument
1231 PHP_MSHUTDOWN_FUNCTION(pgsql) in PHP_MSHUTDOWN_FUNCTION() argument
1243 PHP_RINIT_FUNCTION(pgsql) in PHP_RINIT_FUNCTION() argument
1253 PHP_RSHUTDOWN_FUNCTION(pgsql) in PHP_RSHUTDOWN_FUNCTION() argument
1266 PHP_MINFO_FUNCTION(pgsql) in PHP_MINFO_FUNCTION() argument
1301 PGconn *pgsql; local
1378 pgsql = PQconnectdb(connstring);
1380 pgsql = PQsetdb(host, port, options, tty, dbname);
1382 if (pgsql == NULL || PQstatus(pgsql) == CONNECTION_BAD) {
1383 PHP_PQ_ERROR("Unable to connect to PostgreSQL server: %s", pgsql)
1384 if (pgsql) {
1385 PQfinish(pgsql);
1391 …if (zend_register_persistent_resource(ZSTR_VAL(str.s), ZSTR_LEN(str.s), pgsql, le_plink) == NULL) {
1425 pgsql = (PGconn *) le->ptr;
1428 …if (PQprotocolVersion(pgsql) >= 3 && zend_strtod(PQparameterStatus(pgsql, "server_version"), NULL)…
1432 pg_result = PQexec(pgsql, "RESET ALL;");
1436 RETVAL_RES(zend_register_resource(pgsql, le_plink));
1468 pgsql = PQconnectStart(connstring);
1469 if (pgsql==NULL || PQstatus(pgsql)==CONNECTION_BAD) {
1470 PHP_PQ_ERROR("Unable to connect to PostgreSQL server: %s", pgsql);
1471 if (pgsql) {
1472 PQfinish(pgsql);
1482 pgsql = PQconnectdb(connstring);
1484 pgsql = PQsetdb(host,port,options,tty,dbname);
1486 if (pgsql==NULL || PQstatus(pgsql)==CONNECTION_BAD) {
1487 PHP_PQ_ERROR("Unable to connect to PostgreSQL server: %s", pgsql);
1488 if (pgsql) {
1489 PQfinish(pgsql);
1496 RETVAL_RES(zend_register_resource(pgsql, le_link));
1510 zend_hash_index_update(&PGG(hashes), (uintptr_t) pgsql, &tmp);
1516 …PQsetNoticeProcessor(pgsql, _php_pgsql_notice_handler, (void*)(zend_uintptr_t)Z_RES_HANDLE_P(retur…
1551 PGconn *pgsql; local
1558 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
1562 ret = PQconnectPoll(pgsql);
1625 PGconn *pgsql; local
1640 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
1646 result = PQdb(pgsql);
1649 result = PQErrorMessageTrim(pgsql, &msgbuf);
1654 result = PQoptions(pgsql);
1657 result = PQport(pgsql);
1660 result = PQtty(pgsql);
1663 result = PQhost(pgsql);
1669 add_assoc_long(return_value, "protocol", PQprotocolVersion(pgsql));
1671 if (PQprotocolVersion(pgsql) >= 3) {
1674 add_assoc_string(return_value, "server", (char*)PQparameterStatus(pgsql, "server_version"));
1676 #define PHP_PQ_COPY_PARAM(_x) tmp = (char*)PQparameterStatus(pgsql, _x); \
1768 PGconn *pgsql; local
1783 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
1787 param = (char*)PQparameterStatus(pgsql, param);
1802 PGconn *pgsql; local
1813 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
1818 res = PQexec(pgsql, "SELECT 1;");
1822 if (PQstatus(pgsql) == CONNECTION_OK)
1826 PQreset(pgsql);
1827 if (PQstatus(pgsql) == CONNECTION_OK) {
1844 PGconn *pgsql; local
1861 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
1865 if (PQ_SETNONBLOCKING(pgsql, 0)) {
1869 while ((pgsql_result = PQgetResult(pgsql))) {
1876 pgsql_result = PQexec(pgsql, query);
1877 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) {
1879 PQreset(pgsql);
1880 pgsql_result = PQexec(pgsql, query);
1886 status = (ExecStatusType) PQstatus(pgsql);
1894 PHP_PQ_ERROR("Query failed: %s", pgsql);
1902 pg_result->conn = pgsql;
1946 PGconn *pgsql; local
1964 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
1968 if (PQ_SETNONBLOCKING(pgsql, 0)) {
1972 while ((pgsql_result = PQgetResult(pgsql))) {
2007 pgsql_result = PQexecParams(pgsql, query, num_params,
2009 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) {
2011 PQreset(pgsql);
2012 pgsql_result = PQexecParams(pgsql, query, num_params,
2019 status = (ExecStatusType) PQstatus(pgsql);
2029 PHP_PQ_ERROR("Query failed: %s", pgsql);
2037 pg_result->conn = pgsql;
2061 PGconn *pgsql; local
2080 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
2084 if (PQ_SETNONBLOCKING(pgsql, 0)) {
2088 while ((pgsql_result = PQgetResult(pgsql))) {
2095 pgsql_result = PQprepare(pgsql, stmtname, query, 0, NULL);
2096 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) {
2098 PQreset(pgsql);
2099 pgsql_result = PQprepare(pgsql, stmtname, query, 0, NULL);
2105 status = (ExecStatusType) PQstatus(pgsql);
2113 PHP_PQ_ERROR("Query failed: %s", pgsql);
2121 pg_result->conn = pgsql;
2148 PGconn *pgsql; local
2167 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
2171 if (PQ_SETNONBLOCKING(pgsql, 0)) {
2175 while ((pgsql_result = PQgetResult(pgsql))) {
2204 pgsql_result = PQexecPrepared(pgsql, stmtname, num_params,
2206 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) {
2208 PQreset(pgsql);
2209 pgsql_result = PQexecPrepared(pgsql, stmtname, num_params,
2216 status = (ExecStatusType) PQstatus(pgsql);
2226 PHP_PQ_ERROR("Query failed: %s", pgsql);
2234 pg_result->conn = pgsql;
2372 static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list) argument
2392 …if ((result = PQexec(pgsql, "select oid,typname from pg_type")) == NULL || PQresultStatus(result) …
3161 PGconn *pgsql; local
3177 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
3192 PQtrace(pgsql, fp);
3203 PGconn *pgsql; local
3217 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
3221 PQuntrace(pgsql);
3231 PGconn *pgsql; local
3254 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
3285 if ((pgsql_oid = lo_create(pgsql, wanted_oid)) == InvalidOid) {
3294 if ((pgsql_oid = lo_creat(pgsql, INV_READ|INV_WRITE)) == InvalidOid) {
3311 PGconn *pgsql; local
3362 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
3366 if (lo_unlink(pgsql, oid) == -1) {
3382 PGconn *pgsql; local
3436 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
3461 if ((pgsql_lofd = lo_open(pgsql, oid, pgsql_mode)) == -1) {
3463 if ((oid = lo_creat(pgsql, INV_READ|INV_WRITE)) == 0) {
3468 if ((pgsql_lofd = lo_open(pgsql, oid, pgsql_mode)) == -1) {
3469 if (lo_unlink(pgsql, oid) == -1) {
3478 pgsql_lofp->conn = pgsql;
3489 pgsql_lofp->conn = pgsql;
3501 pgLofp *pgsql; local
3507 …if ((pgsql = (pgLofp *)zend_fetch_resource(Z_RES_P(pgsql_lofp), "PostgreSQL large object", le_lofp…
3511 if (lo_close((PGconn *)pgsql->conn, pgsql->lofd) < 0) {
3512 …php_error_docref(NULL, E_WARNING, "Unable to close PostgreSQL large object descriptor %d", pgsql->…
3534 pgLofp *pgsql; local
3540 …if ((pgsql = (pgLofp *)zend_fetch_resource(Z_RES_P(pgsql_id), "PostgreSQL large object", le_lofp))…
3549 if ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, ZSTR_VAL(buf), ZSTR_LEN(buf)))<0) {
3569 pgLofp *pgsql; local
3591 …if ((pgsql = (pgLofp *)zend_fetch_resource(Z_RES_P(pgsql_id), "PostgreSQL large object", le_lofp))…
3595 if ((nbytes = lo_write((PGconn *)pgsql->conn, pgsql->lofd, str, len)) == (size_t)-1) {
3611 pgLofp *pgsql; local
3617 …if ((pgsql = (pgLofp *)zend_fetch_resource(Z_RES_P(pgsql_id), "PostgreSQL large object", le_lofp))…
3622 while ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, PGSQL_LO_READ_BUF_SIZE))>0) {
3638 PGconn *pgsql; local
3665 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
3698 returned_oid = lo_import_with_oid(pgsql, file_in, wanted_oid);
3708 returned_oid = lo_import(pgsql, file_in);
3727 PGconn *pgsql; local
3801 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
3805 if (lo_export(pgsql, oid, file_out) == -1) {
3818 pgLofp *pgsql; local
3829 …if ((pgsql = (pgLofp *)zend_fetch_resource(Z_RES_P(pgsql_id), "PostgreSQL large object", le_lofp))…
3834 if (PQserverVersion((PGconn *)pgsql->conn) >= 90300) {
3835 result = lo_lseek64((PGconn *)pgsql->conn, pgsql->lofd, offset, (int)whence);
3837 result = lo_lseek((PGconn *)pgsql->conn, pgsql->lofd, (int)offset, (int)whence);
3840 result = lo_lseek((PGconn *)pgsql->conn, pgsql->lofd, offset, whence);
3856 pgLofp *pgsql; local
3863 …if ((pgsql = (pgLofp *)zend_fetch_resource(Z_RES_P(pgsql_id), "PostgreSQL large object", le_lofp))…
3868 if (PQserverVersion((PGconn *)pgsql->conn) >= 90300) {
3869 offset = lo_tell64((PGconn *)pgsql->conn, pgsql->lofd);
3871 offset = lo_tell((PGconn *)pgsql->conn, pgsql->lofd);
3874 offset = lo_tell((PGconn *)pgsql->conn, pgsql->lofd);
3887 pgLofp *pgsql; local
3895 …if ((pgsql = (pgLofp *)zend_fetch_resource(Z_RES_P(pgsql_id), "PostgreSQL large object", le_lofp))…
3900 if (PQserverVersion((PGconn *)pgsql->conn) >= 90300) {
3901 result = lo_truncate64((PGconn *)pgsql->conn, pgsql->lofd, size);
3903 result = lo_truncate((PGconn *)pgsql->conn, pgsql->lofd, size);
3906 result = lo_truncate((PGconn *)pgsql->conn, pgsql->lofd, size);
3925 PGconn *pgsql; local
3941 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
3946 RETURN_LONG(PQsetErrorVerbosity(pgsql, verbosity));
3963 PGconn *pgsql; local
3979 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
3983 RETURN_LONG(PQsetClientEncoding(pgsql, encoding));
3993 PGconn *pgsql; local
4007 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
4013 RETURN_STRING((char *) pg_encoding_to_char(PQclientEncoding(pgsql)));
4028 PGconn *pgsql; local
4043 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
4047 result = PQendcopy(pgsql);
4050 PHP_PQ_ERROR("Query failed: %s", pgsql);
4064 PGconn *pgsql; local
4081 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
4085 result = PQputline(pgsql, query);
4087 PHP_PQ_ERROR("Query failed: %s", pgsql);
4102 PGconn *pgsql; local
4114 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
4128 while ((pgsql_result = PQgetResult(pgsql))) {
4131 pgsql_result = PQexec(pgsql, query);
4140 status = (ExecStatusType) PQstatus(pgsql);
4156 int ret = PQgetCopyData(pgsql, &csv, 0);
4163 PHP_PQ_ERROR("getline failed: %s", pgsql);
4175 if ((ret = PQgetline(pgsql, copybuf, COPYBUFSIZ))) {
4176 PHP_PQ_ERROR("getline failed: %s", pgsql);
4209 if (PQendcopy(pgsql)) {
4210 PHP_PQ_ERROR("endcopy failed: %s", pgsql);
4214 while ((pgsql_result = PQgetResult(pgsql))) {
4224 PHP_PQ_ERROR("Copy command failed: %s", pgsql);
4241 PGconn *pgsql; local
4252 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
4265 while ((pgsql_result = PQgetResult(pgsql))) {
4268 pgsql_result = PQexec(pgsql, query);
4278 status = (ExecStatusType) PQstatus(pgsql);
4297 if (PQputCopyData(pgsql, query, (int)strlen(query)) != 1) {
4300 PHP_PQ_ERROR("copy failed: %s", pgsql);
4307 if (PQputCopyEnd(pgsql, NULL) != 1) {
4308 PHP_PQ_ERROR("putcopyend failed: %s", pgsql);
4322 if (PQputline(pgsql, query)==EOF) {
4325 PHP_PQ_ERROR("copy failed: %s", pgsql);
4332 if (PQputline(pgsql, "\\.\n") == EOF) {
4333 PHP_PQ_ERROR("putline failed: %s", pgsql);
4336 if (PQendcopy(pgsql)) {
4337 PHP_PQ_ERROR("endcopy failed: %s", pgsql);
4341 while ((pgsql_result = PQgetResult(pgsql))) {
4343 PHP_PQ_ERROR("Copy command failed: %s", pgsql);
4359 PHP_PQ_ERROR("Copy command failed: %s", pgsql);
4375 PGconn *pgsql; local
4396 …if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
4399 ZSTR_LEN(to) = PQescapeStringConn(pgsql, ZSTR_VAL(to), ZSTR_VAL(from), ZSTR_LEN(from), NULL);
4419 PGconn *pgsql; local
4441 …if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
4444 to = (char *)PQescapeByteaConn(pgsql, (unsigned char *)from, (size_t)from_len, &to_len);
4594 PGconn *pgsql; local
4616 if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
4620 if (pgsql == NULL) {
4626 tmp = PGSQLescapeLiteral(pgsql, from, (size_t)from_len);
4628 tmp = PGSQLescapeIdentifier(pgsql, from, (size_t)from_len);
4736 PGconn *pgsql; local
4743 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
4747 RETURN_LONG(PQstatus(pgsql));
4758 PGconn *pgsql; local
4765 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
4769 RETURN_LONG(PQtransactionStatus(pgsql));
4780 PGconn *pgsql; local
4787 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
4791 PQreset(pgsql);
4792 if (PQstatus(pgsql) == CONNECTION_BAD) {
4804 static int php_pgsql_flush_query(PGconn *pgsql) argument
4809 if (PQ_SETNONBLOCKING(pgsql, 1)) {
4813 while ((res = PQgetResult(pgsql))) {
4817 PQ_SETNONBLOCKING(pgsql, 0);
4827 PGconn *pgsql; local
4835 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
4839 if (PQ_SETNONBLOCKING(pgsql, 1)) {
4845 PQconsumeInput(pgsql);
4846 RETVAL_LONG(PQisBusy(pgsql));
4849 RETVAL_LONG(PQrequestCancel(pgsql));
4850 while ((pgsql_result = PQgetResult(pgsql))) {
4858 if (PQ_SETNONBLOCKING(pgsql, 0)) {
4881 static int _php_pgsql_link_has_results(PGconn *pgsql) /* {{{ */ argument
4884 while ((result = PQgetResult(pgsql))) {
4899 PGconn *pgsql; local
4907 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
4911 is_non_blocking = PQisnonblocking(pgsql);
4913 if (is_non_blocking == 0 && PQ_SETNONBLOCKING(pgsql, 1) == -1) {
4918 if (_php_pgsql_link_has_results(pgsql)) {
4924 if (!PQsendQuery(pgsql, query)) {
4927 ret = PQflush(pgsql);
4929 if (!PQsendQuery(pgsql, query)) {
4930 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) {
4931 PQreset(pgsql);
4933 if (!PQsendQuery(pgsql, query)) {
4939 while ((ret = PQflush(pgsql))) {
4947 if (PQ_SETNONBLOCKING(pgsql, 0)) {
4972 PGconn *pgsql; local
4980 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
4984 is_non_blocking = PQisnonblocking(pgsql);
4986 if (is_non_blocking == 0 && PQ_SETNONBLOCKING(pgsql, 1) == -1) {
4991 if (_php_pgsql_link_has_results(pgsql)) {
5017 …if (PQsendQueryParams(pgsql, query, num_params, NULL, (const char * const *)params, NULL, NULL, 0)…
5023 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) {
5024 PQreset(pgsql);
5026 …if (!PQsendQueryParams(pgsql, query, num_params, NULL, (const char * const *)params, NULL, NULL, 0…
5033 ret = PQflush(pgsql);
5036 while ((ret = PQflush(pgsql))) {
5044 if (PQ_SETNONBLOCKING(pgsql, 0) != 0) {
5068 PGconn *pgsql; local
5076 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
5080 is_non_blocking = PQisnonblocking(pgsql);
5082 if (is_non_blocking == 0 && PQ_SETNONBLOCKING(pgsql, 1) == -1) {
5087 if (_php_pgsql_link_has_results(pgsql)) {
5092 if (!PQsendPrepare(pgsql, stmtname, query, 0, NULL)) {
5096 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) {
5097 PQreset(pgsql);
5099 if (!PQsendPrepare(pgsql, stmtname, query, 0, NULL)) {
5106 ret = PQflush(pgsql);
5109 while ((ret = PQflush(pgsql))) {
5116 if (PQ_SETNONBLOCKING(pgsql, 0) != 0) {
5143 PGconn *pgsql; local
5151 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
5155 is_non_blocking = PQisnonblocking(pgsql);
5157 if (is_non_blocking == 0 && PQ_SETNONBLOCKING(pgsql, 1) == -1) {
5162 if (_php_pgsql_link_has_results(pgsql)) {
5190 …if (PQsendQueryPrepared(pgsql, stmtname, num_params, (const char * const *)params, NULL, NULL, 0))…
5196 if ((PGG(auto_reset_persistent) & 2) && PQstatus(pgsql) != CONNECTION_OK) {
5197 PQreset(pgsql);
5199 …if (!PQsendQueryPrepared(pgsql, stmtname, num_params, (const char * const *)params, NULL, NULL, 0)…
5206 ret = PQflush(pgsql);
5209 while ((ret = PQflush(pgsql))) {
5216 if (PQ_SETNONBLOCKING(pgsql, 0) != 0) {
5237 PGconn *pgsql; local
5245 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
5249 pgsql_result = PQgetResult(pgsql);
5255 pg_result->conn = pgsql;
5302 PGconn *pgsql; local
5310 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
5319 PQconsumeInput(pgsql);
5320 pgsql_notify = PQnotifies(pgsql);
5331 …if (PQprotocolVersion(pgsql) >= 3 && zend_strtod(PQparameterStatus(pgsql, "server_version"), NULL)…
5345 …if (PQprotocolVersion(pgsql) >= 3 && zend_strtod(PQparameterStatus(pgsql, "server_version"), NULL)…
5363 PGconn *pgsql; local
5370 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
5374 RETURN_LONG(PQbackendPID(pgsql));
5404 PGconn *pgsql = (PGconn *) stream->abstract; local
5407 return PQ_SETNONBLOCKING(pgsql, value);
5416 PGconn *pgsql = (PGconn *) stream->abstract; local
5422 int fd_number = PQsocket(pgsql);
5444 PGconn *pgsql; local
5450 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
5454 stream = php_stream_alloc(&php_stream_pgsql_fd_ops, pgsql, NULL, "r");
5470 PGconn *pgsql; local
5476 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
5480 RETURN_BOOL(PQconsumeInput(pgsql));
5489 PGconn *pgsql; local
5497 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
5501 is_non_blocking = PQisnonblocking(pgsql);
5503 if (is_non_blocking == 0 && PQ_SETNONBLOCKING(pgsql, 1) == -1) {
5508 ret = PQflush(pgsql);
5510 if (is_non_blocking == 0 && PQ_SETNONBLOCKING(pgsql, 0) == -1) {
5644 PGconn *pgsql; local
5651 …if ((pgsql = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_pl…
5656 if (php_pgsql_meta_data(pgsql, table_name, return_value, extended) == FAILURE) {