PHP Conference Ehime 2026

pg_close_stmt

(PHP 8 >= 8.5.0)

pg_close_stmtCloses a prepared statement

Descripción

function pg_close_stmt(PgSql\Connection $connection, string $statement_name): PgSql\Result|false

Closes a prepared statement on the server, freeing its resources and making its name available for reuse. It is an alternative to issuing a DEALLOCATE SQL command, which does not allow the statement name to be reused afterwards.

This function is only available if PHP has been built against libpq 17 or later.

Parámetros

connection

Una instancia PgSql\Connection.

statement_name

The name of the prepared statement to close.

Valores devueltos

A PgSql\Result instance on success, or false on failure.

Errores/Excepciones

Throws a ValueError if statement_name is empty or contains any null bytes.

Véase también

  • pg_prepare() - Envía una solicitud al servidor para crear una sentencia preparada con los parámetros dados y espera la ejecución
  • pg_execute() - Ejecuta una consulta preparada de PostgreSQL
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top