1CALL(7) PostgreSQL 14.3 Documentation CALL(7)
2
3
4
6 CALL - invoke a procedure
7
9 CALL name ( [ argument ] [, ...] )
10
12 CALL executes a procedure.
13
14 If the procedure has any output parameters, then a result row will be
15 returned, containing the values of those parameters.
16
18 name
19 The name (optionally schema-qualified) of the procedure.
20
21 argument
22 An argument expression for the procedure call.
23
24 Arguments can include parameter names, using the syntax name =>
25 value. This works the same as in ordinary function calls; see
26 Section 4.3 for details.
27
28 Arguments must be supplied for all procedure parameters that lack
29 defaults, including OUT parameters. However, arguments matching OUT
30 parameters are not evaluated, so it's customary to just write NULL
31 for them. (Writing something else for an OUT parameter might cause
32 compatibility problems with future PostgreSQL versions.)
33
35 The user must have EXECUTE privilege on the procedure in order to be
36 allowed to invoke it.
37
38 To call a function (not a procedure), use SELECT instead.
39
40 If CALL is executed in a transaction block, then the called procedure
41 cannot execute transaction control statements. Transaction control
42 statements are only allowed if CALL is executed in its own transaction.
43
44 PL/pgSQL handles output parameters in CALL commands differently; see
45 Section 43.6.3.
46
48 CALL do_db_maintenance();
49
51 CALL conforms to the SQL standard, except for the handling of output
52 parameters. The standard says that users should write variables to
53 receive the values of output parameters.
54
56 CREATE PROCEDURE (CREATE_PROCEDURE(7))
57
58
59
60PostgreSQL 14.3 2022 CALL(7)