CALL(7)
π CALL(7): invoke a procedure π
okay so bestie, this is the PostgreSQL 14.24 Documentation page for CALL(7) β the manual name is folded in near the top, we're not copying the header line, and we're literally about to make procedures make sense. no cap. π«Ά
β¨ NAME β¨
CALL β invoke a procedure. that's the whole name, and honestly it ate. π
πΈ SYNOPSIS πΈ
CALL name ( [ argument ] [, ...] )
π¦ DESCRIPTION π¦
CALL executes a procedure. lowkey that's its whole job, and it's iconic for it. β¨
If the procedure has any output parameters, then a result row will be returned, containing the values of those parameters. yes bestie, you get a row back with those values β slay. π
π PARAMETERS π
nameβ the name (optionally schema-qualified) of the procedure. π§argumentβ an argument expression for the procedure call. Arguments can include parameter names, using the syntaxname => value. This works the same as in ordinary function calls; seeSection 4.3for details. Arguments must be supplied for all procedure parameters that lack defaults, including OUT parameters. However, arguments matching OUT parameters are not evaluated, so it's customary to just writeNULLfor them. (Writing something else for an OUT parameter might cause compatibility problems with future PostgreSQL versions.) π¨
π₯ NOTES π₯
- The user must have
EXECUTEprivilege on the procedure in order to be allowed to invoke it. π - To call a function (not a procedure), use
SELECTinstead. π - If
CALLis executed in a transaction block, then the called procedure cannot execute transaction control statements. Transaction control statements are only allowed ifCALLis executed in its own transaction. β οΈ PL/pgSQLhandles output parameters inCALLcommands differently; seeSection 43.6.3. π§
π EXAMPLES π
example time, and she is simple and she slays:
CALL do_db_maintenance();
π COMPATIBILITY π
CALL conforms to the SQL standard, except for the handling of output parameters. The standard says that users should write variables to receive the values of output parameters. periodt. π
β SEE ALSO β
CREATE PROCEDURE (CREATE_PROCEDURE(7))β go read that one too, bestie. π«Ά
xoxo, your PostgreSQL 14.24 docs bestie π β dated 2026, page CALL(7), periodt. π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms