select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Unsupported versions: 7.3 / 7.2 / 7.1
Historical version. PostgreSQL 7.3 reached end of support in November 2007. See the current manual for supported releases.

set_defport

Name

set_defport -- set default port [DV]

Synopsis

set_defport(port)

Parameters

port

New default host (integer/-1).

Return Type

integer or None

Previous default port specification.

Exceptions

TypeError

Bad argument type, or too many arguments.

Description

set_defport() sets the default port value for new connections. If -1 is supplied as parameter, environment variables will be used in future connections. It returns the previous setting for default port.

Report a documentation issue

Read the upstream documentation. For corrections, first check the current manual.