summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdin Kadribasic <edink@php.net>2006-03-14 11:04:13 +0000
committerEdin Kadribasic <edink@php.net>2006-03-14 11:04:13 +0000
commitbcf85422c23e273f4599008b5f9a77c23f45862a (patch)
tree8d4354f21eb4bcd04ec34d2439d70a01afd1bf45
parent79f91078ef490dabd196b27c11e3bcafe06673e6 (diff)
downloadphp-git-bcf85422c23e273f4599008b5f9a77c23f45862a.tar.gz
MFB: more verbose phpinfo() output
-rw-r--r--ext/pdo_pgsql/config.w325
-rw-r--r--ext/pdo_pgsql/pdo_pgsql.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/ext/pdo_pgsql/config.w32 b/ext/pdo_pgsql/config.w32
index 6af9c98072..3c74c9bf00 100644
--- a/ext/pdo_pgsql/config.w32
+++ b/ext/pdo_pgsql/config.w32
@@ -7,6 +7,11 @@ if (PHP_PDO_PGSQL != "no") {
if (CHECK_LIB("libpq.lib", "pdo_pgsql", PHP_PDO_PGSQL) &&
CHECK_HEADER_ADD_INCLUDE("libpq-fe.h", "CFLAGS_PDO_PGSQL", PHP_PDO_PGSQL + ";" + PHP_PHP_BUILD + "\\include\\pgsql")) {
EXTENSION("pdo_pgsql", "pdo_pgsql.c pgsql_driver.c pgsql_statement.c");
+
+ if (CHECK_HEADER_ADD_INCLUDE("pg_config.h", "CFLAGS_PDO_PGSQL", PHP_PDO_PGSQL + ";" + PHP_PHP_BUILD + "\\include\\pgsql")) {
+ ADD_FLAG('CFLAGS_PDO_PGSQL', "/D HAVE_PG_CONFIG_H");
+ }
+
ADD_FLAG('CFLAGS_PDO_PGSQL', "/I ..\\pecl");
AC_DEFINE('HAVE_PDO_PGSQL', 1, 'Have PostgreSQL library');
ADD_FLAG('CFLAGS_PDO_PGSQL', "/D HAVE_PQPARAMETERSTATUS=1 /D HAVE_PQPROTOCOLVERSION=1 /D HAVE_PGTRANSACTIONSTATUS=1 /D HAVE_PQUNESCAPEBYTEA=1 /D HAVE_PQRESULTERRORFIELD=1");
diff --git a/ext/pdo_pgsql/pdo_pgsql.c b/ext/pdo_pgsql/pdo_pgsql.c
index 1c51bb4e1a..62b5ec6543 100644
--- a/ext/pdo_pgsql/pdo_pgsql.c
+++ b/ext/pdo_pgsql/pdo_pgsql.c
@@ -30,6 +30,10 @@
#include "php_pdo_pgsql.h"
#include "php_pdo_pgsql_int.h"
+#ifdef HAVE_PG_CONFIG_H
+#include <pg_config.h>
+#endif
+
/* {{{ pdo_pgsql_functions[] */
zend_function_entry pdo_pgsql_functions[] = {
{NULL, NULL, NULL}
@@ -115,6 +119,12 @@ PHP_MINFO_FUNCTION(pdo_pgsql)
{
php_info_print_table_start();
php_info_print_table_header(2, "PDO Driver for PostgreSQL", "enabled");
+#ifdef HAVE_PG_CONFIG_H
+ php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION);
+#endif
+ php_info_print_table_row(2, "Module version", pdo_pgsql_module_entry.version);
+ php_info_print_table_row(2, "Revision", " $Id$ ");
+
php_info_print_table_end();
}
/* }}} */