pg_parameter_status — Get the value of a parameter from the database server


pg_parameter_status conn paramName


pg_parameter_status returns the value of a PostgreSQL parameter as supplied by the server. Different releases of PostgreSQL may provide different parameters. As of PostgreSQL-8.4.0, the following parameters are available.

ParameterDescriptionExample Value
client_encodingClient's character set encodingSQL_ASCII or UNICODE
DateStyleDisplay format and rules for ambiguous date/time valuesISO, MDY
integer_datetimesDate/times are integer basedoff
IntervalStyleDisplay format and rules for interval typespostgres
is_superuserHas superuser rights?off
server_encodingServer (database) character set encodingSQL_ASCII or UNICODE
server_versionPostgreSQL server version8.4.0
standard_conforming_stringsBackslash \ is literal in quoted stringsoff
TimeZoneTime zone for displaying and interpreting time stampsEST5EDT



The handle of the connection.


The name of the parameter to get. See above list.

Return Value

The value of the parameter, or an empty string if no such parameter was supplied by the database.


This command does not contact the database server. Parameters are supplied by the server at connection time (or possibly later) and saved by the interface until needed.

For another way to access the server version, see pg_server_version.

This command uses or emulates the PostgreSQL libpq function PQparameterStatus. Logo

This version of the manual was produced for the Pgtcl-ng Sourceforge project web service site, which requires the logo on each page.

To download a logo-free copy of the manual, see the Pgtcl-ng project downloads area.