]> granicus.if.org Git - php/commitdiff
Print PostgreSQL version number in phpinfo()
authorYasuo Ohgaki <yohgaki@php.net>
Sun, 31 Mar 2002 01:18:32 +0000 (01:18 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Sun, 31 Mar 2002 01:18:32 +0000 (01:18 +0000)
ext/pgsql/config.m4
ext/pgsql/pgsql.c
ext/pgsql/php_pgsql.h

index 85f85685107097382771e254ae2be8a7f5459de4..c7abbbb3c9e8fabafb6835d2073aadc085dd6a28 100644 (file)
@@ -23,6 +23,9 @@ if test "$PHP_PGSQL" != "no"; then
       if test -r "$i/$j/libpq-fe.h"; then
         PGSQL_INC_BASE=$i
         PGSQL_INCLUDE=$i/$j
+        if test -r "$i/$j/pg_config.h"; then
+          AC_DEFINE(HAVE_PG_CONFIG_H,1,[Whether to have pg_config.h])
+        fi
       fi
     done
 
index 2d71c17507960a7324dbbec8503bb324c31647b0..413f4d2aba04fad1d9157f59911d9ce4c12a0c3a 100644 (file)
@@ -399,6 +399,9 @@ PHP_MINFO_FUNCTION(pgsql)
 
        php_info_print_table_start();
        php_info_print_table_header(2, "PostgreSQL Support", "enabled");
+#ifdef HAVE_PG_CONFIG_H
+       php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION);
+#endif 
        sprintf(buf, "%ld", PGG(num_persistent));
        php_info_print_table_row(2, "Active Persistent Links", buf);
        sprintf(buf, "%ld", PGG(num_links));
index 03390696c54293bd7ff86a8d8e4d01fc6e5c9061..85573d8ad8f011591ae2bc107766714f72ce8b83 100644 (file)
@@ -38,6 +38,10 @@ extern zend_module_entry pgsql_module_entry;
 #include <libpq/libpq-fs.h>
 #endif
 
+#ifdef HAVE_PG_CONFIG_H
+#include <pg_config.h>
+#endif
+
 #ifdef HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT
 const char * pg_encoding_to_char(int encoding);
 #endif