select open change scope Open full search

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

Supported versions: Current (18) / 17 / 16 / 15 / 14
Development versions: 19 / devel
Unsupported versions: 13 / 12 / 11
Historical version. PostgreSQL 13 reached end of support in November 2025. See the current version for supported releases.

CALL

CALL — invoke a procedure

Synopsis

CALL name ( [ argument ] [, ...] )

Description

CALL executes a procedure.

If the procedure has any output parameters, then a result row will be returned, containing the values of those parameters.

Parameters

name

The name (optionally schema-qualified) of the procedure.

argument

An input argument for the procedure call. See Section 4.3 for the full details on function and procedure call syntax, including use of named parameters.

Notes

The user must have EXECUTE privilege on the procedure in order to be allowed to invoke it.

To call a function (not a procedure), use SELECT instead.

If CALL is executed in a transaction block, then the called procedure cannot execute transaction control statements. Transaction control statements are only allowed if CALL is executed in its own transaction.

PL/pgSQL handles output parameters in CALL commands differently; see Section 42.6.3.

Examples

CALL do_db_maintenance();

Compatibility

CALL conforms to the SQL standard.

Report a documentation issue

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