summaryrefslogtreecommitdiffstats
path: root/doc/src/sgml/man7/CALL.7
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:17:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:17:33 +0000
commit5e45211a64149b3c659b90ff2de6fa982a5a93ed (patch)
tree739caf8c461053357daa9f162bef34516c7bf452 /doc/src/sgml/man7/CALL.7
parentInitial commit. (diff)
downloadpostgresql-15-5e45211a64149b3c659b90ff2de6fa982a5a93ed.tar.xz
postgresql-15-5e45211a64149b3c659b90ff2de6fa982a5a93ed.zip
Adding upstream version 15.5.upstream/15.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/src/sgml/man7/CALL.7')
-rw-r--r--doc/src/sgml/man7/CALL.7108
1 files changed, 108 insertions, 0 deletions
diff --git a/doc/src/sgml/man7/CALL.7 b/doc/src/sgml/man7/CALL.7
new file mode 100644
index 0000000..63758cb
--- /dev/null
+++ b/doc/src/sgml/man7/CALL.7
@@ -0,0 +1,108 @@
+'\" t
+.\" Title: CALL
+.\" Author: The PostgreSQL Global Development Group
+.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
+.\" Date: 2023
+.\" Manual: PostgreSQL 15.5 Documentation
+.\" Source: PostgreSQL 15.5
+.\" Language: English
+.\"
+.TH "CALL" "7" "2023" "PostgreSQL 15.5" "PostgreSQL 15.5 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 argument expression for the procedure call\&.
+.sp
+Arguments can include parameter names, using the syntax
+\fIname\fR => \fIvalue\fR\&. This works the same as in ordinary function calls; see
+Section\ \&4.3
+for details\&.
+.sp
+Arguments must be supplied for all procedure parameters that lack defaults, including
+OUT
+parameters\&. However, arguments matching
+OUT
+parameters are not evaluated, so it\*(Aqs customary to just write
+NULL
+for them\&. (Writing something else for an
+OUT
+parameter might cause compatibility problems with future
+PostgreSQL
+versions\&.)
+.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\ \&43.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, except for the handling of output parameters\&. The standard says that users should write variables to receive the values of output parameters\&.
+.SH "SEE ALSO"
+CREATE PROCEDURE (\fBCREATE_PROCEDURE\fR(7))