Skip to content

Commit 3619caa

Browse files
authored
ext/{pdo_pgsql,pgsql}: Enable HAVE_PG_RESULT_MEMORY_SIZE (#21595)
PQresultMemorySize is available since libpq 12. On Windows libpq 16.2 is used at time of writing: https://github.com/winlibs/postgresql
1 parent d0852d5 commit 3619caa

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ext/pdo_pgsql/config.w32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ if (PHP_PDO_PGSQL != "no") {
77
CHECK_HEADER("libpq-fe.h", "CFLAGS_PDO_PGSQL", PHP_PDO_PGSQL + "\\include;" + PHP_PHP_BUILD + "\\include\\pgsql;" + PHP_PHP_BUILD + "\\include\\libpq;")) {
88
EXTENSION("pdo_pgsql", "pdo_pgsql.c pgsql_driver.c pgsql_statement.c pgsql_sql_parser.c");
99

10+
AC_DEFINE('HAVE_PG_RESULT_MEMORY_SIZE', 1, "Define to 1 if libpq has the 'PQresultMemorySize' function (PostgreSQL 12 or later).");
1011
AC_DEFINE('HAVE_PDO_PGSQL', 1, "Define to 1 if the PHP extension 'pdo_pgsql' is available.");
1112

1213
ADD_EXTENSION_DEP('pdo_pgsql', 'pdo');

ext/pgsql/config.w32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ if (PHP_PGSQL != "no") {
66
if (CHECK_LIB("libpq.lib", "pgsql", PHP_PGSQL) &&
77
CHECK_HEADER("libpq-fe.h", "CFLAGS_PGSQL", PHP_PGSQL + "\\include;" + PHP_PHP_BUILD + "\\include\\pgsql;" + PHP_PHP_BUILD + "\\include\\libpq;" + PHP_PGSQL)) {
88
EXTENSION("pgsql", "pgsql.c", PHP_PGSQL_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
9+
AC_DEFINE('HAVE_PG_RESULT_MEMORY_SIZE', 1, "Define to 1 if libpq has the 'PQresultMemorySize' function (PostgreSQL 12 or later).");
910
AC_DEFINE('HAVE_PGSQL', 1, "Define to 1 if the PHP extension 'pgsql' is available.");
1011
ADD_FLAG("CFLAGS_PGSQL", "/D PGSQL_EXPORTS");
1112
ADD_EXTENSION_DEP('pgsql', 'pcre');

0 commit comments

Comments
 (0)