diff options
| author | Yasuo Ohgaki <yohgaki@ohgaki.net> | 2012-03-30 09:45:33 +0900 |
|---|---|---|
| committer | Johannes Schlüter <johannes@php.net> | 2012-04-18 12:20:35 +0200 |
| commit | cce0f8e507c05ecc7c8222efa5005991f04ce4c0 (patch) | |
| tree | 5097105aca69f46267bf67913cdec51c14ddb8d9 /ext/pgsql/pgsql.c | |
| parent | d55afe4df63945a6e3abe9892ba7836f83c74265 (diff) | |
| download | php-git-cce0f8e507c05ecc7c8222efa5005991f04ce4c0.tar.gz | |
Implement Request #47570 libpq's PG_VERSION should be exported to userland
Diffstat (limited to 'ext/pgsql/pgsql.c')
| -rw-r--r-- | ext/pgsql/pgsql.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index d8127af8c1..54a86a8276 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -934,6 +934,11 @@ PHP_MINIT_FUNCTION(pgsql) le_result = zend_register_list_destructors_ex(_free_result, NULL, "pgsql result", module_number); le_lofp = zend_register_list_destructors_ex(_free_ptr, NULL, "pgsql large object", module_number); le_string = zend_register_list_destructors_ex(_free_ptr, NULL, "pgsql string", module_number); +#if HAVE_PG_CONFIG_H + /* PG_VERSION - libpq version */ + REGISTER_STRING_CONSTANT("PGSQL_LIBPQ_VERSION", PG_VERSION, CONST_CS | CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("PGSQL_LIBPQ_VERSION_STR", PG_VERSION_STR, CONST_CS | CONST_PERSISTENT); +#endif /* For connection option */ REGISTER_LONG_CONSTANT("PGSQL_CONNECT_FORCE_NEW", PGSQL_CONNECT_FORCE_NEW, CONST_CS | CONST_PERSISTENT); /* For pg_fetch_array() */ @@ -1048,6 +1053,7 @@ PHP_MINFO_FUNCTION(pgsql) php_info_print_table_header(2, "PostgreSQL Support", "enabled"); #if HAVE_PG_CONFIG_H php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION); + php_info_print_table_row(2, "PostgreSQL(libpq) ", PG_VERSION_STR); #ifdef HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT php_info_print_table_row(2, "Multibyte character support", "enabled"); #else |
