@@ -934,6 +934,11 @@ PHP_MINIT_FUNCTION(pgsql)
934
934
le_result = zend_register_list_destructors_ex (_free_result , NULL , "pgsql result" , module_number );
935
935
le_lofp = zend_register_list_destructors_ex (_free_ptr , NULL , "pgsql large object" , module_number );
936
936
le_string = zend_register_list_destructors_ex (_free_ptr , NULL , "pgsql string" , module_number );
937
+ #if HAVE_PG_CONFIG_H
938
+ /* PG_VERSION - libpq version */
939
+ REGISTER_STRING_CONSTANT ("PGSQL_LIBPQ_VERSION" , PG_VERSION , CONST_CS | CONST_PERSISTENT );
940
+ REGISTER_STRING_CONSTANT ("PGSQL_LIBPQ_VERSION_STR" , PG_VERSION_STR , CONST_CS | CONST_PERSISTENT );
941
+ #endif
937
942
/* For connection option */
938
943
REGISTER_LONG_CONSTANT ("PGSQL_CONNECT_FORCE_NEW" , PGSQL_CONNECT_FORCE_NEW , CONST_CS | CONST_PERSISTENT );
939
944
/* For pg_fetch_array() */
@@ -1048,6 +1053,7 @@ PHP_MINFO_FUNCTION(pgsql)
1048
1053
php_info_print_table_header (2 , "PostgreSQL Support" , "enabled" );
1049
1054
#if HAVE_PG_CONFIG_H
1050
1055
php_info_print_table_row (2 , "PostgreSQL(libpq) Version" , PG_VERSION );
1056
+ php_info_print_table_row (2 , "PostgreSQL(libpq) " , PG_VERSION_STR );
1051
1057
#ifdef HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT
1052
1058
php_info_print_table_row (2 , "Multibyte character support" , "enabled" );
1053
1059
#else
0 commit comments