DEALLOCATE

An SQL command for removing a prepared statement

DEALLOCATE is a utility command for creating a prepared statement.

DEALLOCATE was added in PostgreSQL 7.3.

Change history

Examples

Basic usage example for DEALLOCATE:

postgres=# PREPARE some_stmt AS SELECT 1;
PREPARE

postgres=# DEALLOCATE some_stmt;
DEALLOCATE

Attempting to remove a non-existent prepared statement:

postgres=# DEALLOCATE other_stmt;
ERROR:  prepared statement "other_stmt" does not exist

Categories

Utility command

See also

PREPARE, EXECUTE