summaryrefslogtreecommitdiffstats
path: root/doc/src/sgml/man7/CALL.7
blob: da056f4ef9a33d1ae0f42edd0ecbd4c9ec7350e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
'\" t
.\"     Title: CALL
.\"    Author: The PostgreSQL Global Development Group
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\"      Date: 2021
.\"    Manual: PostgreSQL 13.4 Documentation
.\"    Source: PostgreSQL 13.4
.\"  Language: English
.\"
.TH "CALL" "7" "2021" "PostgreSQL 13.4" "PostgreSQL 13.4 Documentation"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
CALL \- invoke a procedure
.SH "SYNOPSIS"
.sp
.nf
CALL \fIname\fR ( [ \fIargument\fR ] [, \&.\&.\&.] )
.fi
.SH "DESCRIPTION"
.PP
\fBCALL\fR
executes a procedure\&.
.PP
If the procedure has any output parameters, then a result row will be returned, containing the values of those parameters\&.
.SH "PARAMETERS"
.PP
\fIname\fR
.RS 4
The name (optionally schema\-qualified) of the procedure\&.
.RE
.PP
\fIargument\fR
.RS 4
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\&.
.RE
.SH "NOTES"
.PP
The user must have
EXECUTE
privilege on the procedure in order to be allowed to invoke it\&.
.PP
To call a function (not a procedure), use
\fBSELECT\fR
instead\&.
.PP
If
\fBCALL\fR
is executed in a transaction block, then the called procedure cannot execute transaction control statements\&. Transaction control statements are only allowed if
\fBCALL\fR
is executed in its own transaction\&.
.PP
PL/pgSQL
handles output parameters in
\fBCALL\fR
commands differently; see
Section\ \&42.6.3\&.
.SH "EXAMPLES"
.sp
.if n \{\
.RS 4
.\}
.nf
CALL do_db_maintenance();
.fi
.if n \{\
.RE
.\}
.SH "COMPATIBILITY"
.PP
\fBCALL\fR
conforms to the SQL standard\&.
.SH "SEE ALSO"
CREATE PROCEDURE (\fBCREATE_PROCEDURE\fR(7))