DEALLOCATE(7)
π DEALLOCATE(7) β the "let it go" of prepared statements
Okay bestie, so this is the DEALLOCATE page from the PostgreSQL 15.19 Documentation. Yes, that's a manual name up there in the corner β we're in section 7 and it's giving "SQL command" energy. Let's get into it π«Ά
β¨ SYNOPSIS β¨
DEALLOCATE [ PREPARE ] { name | ALL }
Look at her. Look at the syntax. PREPARE is optional, and then you either name your statement or you go ALL and nuke the whole collection. Iconic either way π
π¦ DESCRIPTION π¦
So DEALLOCATE is literally the command you use to deallocate a previously prepared SQL statement β like, you prepared a statement earlier and now you're cleaning up after yourself, main character behavior honestly β¨
And here's the tea: if you do not explicitly deallocate a prepared statement, it gets deallocated when the session ends. So the universe (the session) does it for you eventually. But bestie, you can also just be a responsible queen and do it yourself π
For more info on prepared statements, go read PREPARE(7) β it's the origin story, iykyk π
π PARAMETERS π
PREPAREβ This key word is ignored. That's it. That's the whole thing. She's there, she's decorative, she does nothing. A true icon of doing the absolute least πnameβ The name of the prepared statement you want to deallocate. Like calling someone out by name, but nice πALLβ Deallocate all prepared statements. Every single one. No survivors.ALLsaid "not me being the main character of this command" π₯
Lowkey a vibe check reminder: ALL means all of them, so don't come crying to me when your prepared statements are gone π
π COMPATIBILITY π
The SQL standard does include a DEALLOCATE statement, ngl β but it's only for use in embedded SQL. So like, similar name, different context. Don't get it twisted π§
β SEE ALSO β
The holy trinity of prepare / execute / deallocate. Go read them all, bestie, they're like a trilogy πβ¨
That's the whole page, bestie β shipped to you from PostgreSQL 15.19, dated 2026. Now go deallocate something responsibly ππ π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms