DEALLOCATE(7)
๐ DEALLOCATE
okay bestie, this is the PostgreSQL 18.6 manual page for DEALLOCATE โ the lil cleanup queen of prepared statements. let's get into it โจ
๐ธ NAME
DEALLOCATE โ deallocate a prepared statement. that's it, that's the whole vibe. it's the "ok bye" button for a statement you prepped earlier ๐ซถ
โจ SYNOPSIS
DEALLOCATE [ PREPARE ] { name | ALL }
look at her. so simple. so iconic. ๐
๐ฆ DESCRIPTION
so DEALLOCATE is what you use to deallocate a previously prepared SQL statement. like, you prepped it, you used it, and now you're releasing it back into the wild. no cap.
and here's the tea: if you don't explicitly deallocate a prepared statement, it gets deallocated anyway when the session ends. so it's not like it's gonna haunt you forever โ but if you want it gone now, this is your girl ๐
want the full lore on prepared statements? go read PREPARE(7). it's giving prerequisites, fr fr.
๐ PARAMETERS
PREPAREโ this key word is ignored. literally does nothing. it's just there for decoration, main character energy with zero lines. not me putting a whole keyword in the synopsis that gets ignored ๐ญnameโ the name of the prepared statement you wanna deallocate. tell her who she is and send her off ๐ฆALLโ deallocate all prepared statements. every single one. scorched earth. slay.
๐ COMPATIBILITY
so the SQL standard does include a DEALLOCATE statement โ but plot twist, it's only for use in embedded SQL. so like, don't go comparing yourself to the standard's version, they're different girlies. iykyk.
๐ SEE ALSO
go read those too, bestie, they're the whole friend group ๐
and that's a wrap on DEALLOCATE(7) from the PostgreSQL 18.6 documentation, dated 2026. thank you for coming to my ted talk, deallocate responsibly, and remember: if you don't clean up your prepared statements, the session will do it for you when it ends. periodt. ๐
โจ๐
๐ฆ where this page comes from
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms