September 26, 2024: PostgreSQL 17 Released!
Unsupported versions: 7.3 / 7.2 / 7.1
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

set_defopt

Name

set_defopt -- set options specification [DV]

Synopsis

set_defopt(options)

Parameters

options

New default connection options (string/None).

Return Type

string or None

Previous default opt specification.

Exceptions

TypeError

Bad argument type, or too many arguments.

Description

set_defopt() sets the default connection options value for new connections. If None is supplied as parameter, environment variables will be used in future connections. It returns the previous setting for default options.