pg_parameter_status
pg_parameter_status
Looks up a current parameter setting of the server
string **pg_parameter_status** PgSql\Connection $connection string $param_name
Looks up a current parameter setting of the server.
Certain parameter values are reported by the server automatically at
connection startup or whenever their values change. can be
used to interrogate these settings. It returns the current value of a
parameter if known, or false if the parameter is not known.
pg_parameter_status
Parameters reported by the server include ,
, ,
, ,
, , and .
Note that
, and
cannot change after PostgreSQL startup.
server_version``server_encoding``client_encoding``is_superuser``session_authorization``DateStyle``TimeZone``integer_datetimes``server_version``server_encoding``integer_datetimes
connection``param_name
Possible values include ,
, ,
, ,
, , and
. Note that this value is case-sensitive.
param_name``server_version``server_encoding``client_encoding``is_superuser``session_authorization``DateStyle``TimeZone``integer_datetimes
A containing the value of the parameter, false on failure or invalid
.string``param_name
Voorbeeld: example
<?php
$dbconn = pg_connect("dbname=publisher") or die("Could not connect");
echo "Server encoding: ", pg_parameter_status($dbconn, "server_encoding");
?>
Server encoding: SQL_ASCII