This bumps the libpq client-side PostgreSQL library minimum required version from 9.1 to 10.0. - Sanity check: PQlibVersion -> PQencryptPasswordConn (available since libpq 10.0) - PQsetErrorContextVisibility (available since libpq 9.6) - lo_truncate64 (available since libpq 9.3), if 32-bit system doesn't support lo_*64 functions, error is returned and functions are always available Additionally, the conditional functions usages in pdo_pgsql and pgsql extensions that got piled up are cleaned and synced: - pg_prepare (PQprepare available since libpq 7.4) - pg_query_params (PQexecParams available since libpq 7.4) - pg_result_error_field (PQresultErrorField available since libpq 7.4) - pg_send_prepare (PQsendPrepare available since libpq 7.4) - pg_send_query_params (PQsendQueryParams available since libpq 7.4) - pg_set_error_verbosity (PQsetErrorVerbosity available since libpq 7.4) - pg_transaction_status (PQtransactionStatus available since libpq 7.4) The Windows libpq version is currently at version 11.4: https://github.com/winlibs/postgresql Discussion: https://news-web.php.net/php.internals/123609 Follow-up of GH-14540
31 lines
698 B
PHP
31 lines
698 B
PHP
--TEST--
|
|
PostgreSQL optional functions
|
|
--EXTENSIONS--
|
|
pgsql
|
|
--SKIPIF--
|
|
<?php include("inc/skipif.inc"); ?>
|
|
--FILE--
|
|
<?php
|
|
// optional functions
|
|
|
|
include('inc/config.inc');
|
|
|
|
$db = pg_connect($conn_str);
|
|
$enc = pg_client_encoding($db);
|
|
|
|
pg_set_client_encoding($db, $enc);
|
|
|
|
pg_set_error_verbosity($db, PGSQL_ERRORS_TERSE);
|
|
pg_set_error_verbosity($db, PGSQL_ERRORS_DEFAULT);
|
|
pg_set_error_verbosity($db, PGSQL_ERRORS_VERBOSE);
|
|
pg_set_error_verbosity($db, PGSQL_ERRORS_SQLSTATE);
|
|
|
|
pg_set_error_context_visibility($db, PGSQL_SHOW_CONTEXT_NEVER);
|
|
pg_set_error_context_visibility($db, PGSQL_SHOW_CONTEXT_ERRORS);
|
|
pg_set_error_context_visibility($db, PGSQL_SHOW_CONTEXT_ALWAYS);
|
|
|
|
echo "OK";
|
|
?>
|
|
--EXPECT--
|
|
OK
|