pg_parameter_status

Name

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

Synopsis

pg_parameter_status conn paramName

Description

pg_parameter_status returns the value of a PostgreSQL parameter as supplied by the server. The following table lists the parameters typically available.

ParameterDescriptionExample Value
server_versionPostgreSQL server version7.4.1
client_encodingClient-side encoding (character set)SQL_ASCII
is_superuserHas superuser rights?off
DateStyleDisplay format and rules for ambiguous date/time valuesISO, MDY
session_authorizationUsernameguest

Arguments

conn

The handle of the connection

paramName

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.

Notes

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.

This command uses or emulates the PostgreSQL libpq function PQparameterStatus.