↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / SQL Commands

DEALLOCATE

deallocate a prepared statement

English manual coverage begins with PostgreSQL 6.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

anchor
SQL-DEALLOCATE
file
sql-deallocate.html
lang
en
name
DEALLOCATE
purpose
deallocate a prepared statement
purpose zh
释放一个预备语句
sections same as
Unknown
slug
18
synopsis html
DEALLOCATE [ PREPARE ] { <em class="replaceable"><code>name</code></em> | ALL }
synopsis text
DEALLOCATE [ PREPARE ] { name | ALL }

Syntax

DEALLOCATE [ PREPARE ] { name | ALL }
Syntax diagrams

Read left to right. Branches are choices, bypasses are optional, loops repeat. Select an underlined parameter to open its rule.

DEALLOCATE PREPARE name ALL

Definition PG 18

DEALLOCATE [ PREPARE ] { name | ALL }

Description

DEALLOCATE is used to deallocate a previously prepared SQL statement. If you do not explicitly deallocate a prepared statement, it is deallocated when the session ends.

For more information on prepared statements, see PREPARE.

Parameters

PREPARE

This key word is ignored.

name

The name of the prepared statement to deallocate.

ALL

Deallocate all prepared statements.

Compatibility

The SQL standard includes a DEALLOCATE statement, but it is only for use in embedded SQL.

See Also

EXECUTE, PREPARE

Compare versions

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:72607ee5bbb79b9a69e787d8ae4cf16d689b86dcbbc684de372d2407f542f4d6

Text language: en · wiki-repair-20261023:72607ee5bbb79b9a69e787d8ae4cf16d689b86dcbbc684de372d2407f542f4d6