1EXECUTE(7)               PostgreSQL 13.4 Documentation              EXECUTE(7)
2
3
4

NAME

6       EXECUTE - execute a prepared statement
7

SYNOPSIS

9       EXECUTE name [ ( parameter [, ...] ) ]
10

DESCRIPTION

12       EXECUTE is used to execute a previously prepared statement. Since
13       prepared statements only exist for the duration of a session, the
14       prepared statement must have been created by a PREPARE statement
15       executed earlier in the current session.
16
17       If the PREPARE statement that created the statement specified some
18       parameters, a compatible set of parameters must be passed to the
19       EXECUTE statement, or else an error is raised. Note that (unlike
20       functions) prepared statements are not overloaded based on the type or
21       number of their parameters; the name of a prepared statement must be
22       unique within a database session.
23
24       For more information on the creation and usage of prepared statements,
25       see PREPARE(7).
26

PARAMETERS

28       name
29           The name of the prepared statement to execute.
30
31       parameter
32           The actual value of a parameter to the prepared statement. This
33           must be an expression yielding a value that is compatible with the
34           data type of this parameter, as was determined when the prepared
35           statement was created.
36

OUTPUTS

38       The command tag returned by EXECUTE is that of the prepared statement,
39       and not EXECUTE.
40

EXAMPLES

42       Examples are given in Examples in the PREPARE(7) documentation.
43

COMPATIBILITY

45       The SQL standard includes an EXECUTE statement, but it is only for use
46       in embedded SQL. This version of the EXECUTE statement also uses a
47       somewhat different syntax.
48

SEE ALSO

50       DEALLOCATE(7), PREPARE(7)
51
52
53
54PostgreSQL 13.4                      2021                           EXECUTE(7)
Impressum