3 .\" Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
6 .\" Manual: PostgreSQL 18.0 Documentation
7 .\" Source: PostgreSQL 18.0
10 .TH "CALL" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 CALL \- invoke a procedure
35 CALL \fIname\fR ( [ \fIargument\fR ] [, \&.\&.\&.] )
40 executes a procedure\&.
42 If the procedure has any output parameters, then a result row will be returned, containing the values of those parameters\&.
47 The name (optionally schema\-qualified) of the procedure\&.
52 An argument expression for the procedure call\&.
54 Arguments can include parameter names, using the syntax
55 \fIname\fR => \fIvalue\fR\&. This works the same as in ordinary function calls; see
59 Arguments must be supplied for all procedure parameters that lack defaults, including
61 parameters\&. However, arguments matching
63 parameters are not evaluated, so it\*(Aqs customary to just write
65 for them\&. (Writing something else for an
67 parameter might cause compatibility problems with future
75 privilege on the procedure in order to be allowed to invoke it\&.
77 To call a function (not a procedure), use
83 is executed in a transaction block, then the called procedure cannot execute transaction control statements\&. Transaction control statements are only allowed if
85 is executed in its own transaction\&.
88 handles output parameters in
90 commands differently; see
98 CALL do_db_maintenance();
106 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\&.
108 CREATE PROCEDURE (\fBCREATE_PROCEDURE\fR(7))