{"Entry":{"collection":"sql","key":"deallocate","name":"DEALLOCATE","aliases":["deallocate"],"metadata":{"aliases":["deallocate"],"changed_in":["8.2","8.3"],"changes":[{"from":"7.2","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"added","synopsis":null,"to":"7.3"},{"from":"7.3","purpose_changed":true,"renamed":null,"sections":{"added":["parameters"],"changed":["description","compatibility"],"removed":[]},"status":"changed","synopsis":null,"to":"7.4"},{"from":"7.4","purpose_changed":false,"renamed":null,"sections":{"added":["see_also"],"changed":[],"removed":[]},"status":"changed","synopsis":null,"to":"8.0"},{"from":"8.1","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters"],"removed":[]},"status":"changed","synopsis":{"added":["DEALLOCATE [ PREPARE ] name"],"removed":["DEALLOCATE [ PREPARE ] plan_name"]},"to":"8.2"},{"from":"8.2","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters"],"removed":[]},"status":"changed","synopsis":{"added":["DEALLOCATE [ PREPARE ] { name | ALL }"],"removed":[]},"to":"8.3"}],"content_hash":"57de66f5b2c8f12a03f58dea4964eaa317a4b517382f21fec5f4956f3e54e005","derived_content_hash":"ea9a90f0386ff52b417b63522eec2d108adb5c9b7dcd5986bae2c34f8cee2721","editorial":{},"first_version":"7.3","group":"cursor","imported_at":"2026-09-30T17:43:39.153975+08:00","last_version":"20","name":"DEALLOCATE","object":"","position":12001,"present_in":["7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"purpose":"deallocate a prepared statement","purpose_zh":"","related":["execute","prepare"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:1db949d4efa8a733fe91a85ca400fd2dd40a759bba0ecdf43d6807544ebf883b","receipt_sha256":"7d34c8fb5b85022195fea4fbf4c2a2104ee9cbe49043b20fbf601ee42d434bd7","repair":"wiki-repair-20261023"},"slug":"deallocate","source_rev":"wiki-repair-20261023:72607ee5bbb79b9a69e787d8ae4cf16d689b86dcbbc684de372d2407f542f4d6","synopsis":"DEALLOCATE [ PREPARE ] { name | ALL }","verb":"DEALLOCATE"}},"Definition":{"Collection":"sql","Key":"deallocate","SourceDatabase":"center","Version":"18","SourceTable":"sqlcmd","SourceKey":"deallocate","SourceRevision":"wiki-repair-20261023:72607ee5bbb79b9a69e787d8ae4cf16d689b86dcbbc684de372d2407f542f4d6","Facts":{"anchor":"SQL-DEALLOCATE","description_zh":"释放一个预备语句","description_zh_html":"\u003cpre\u003eDEALLOCATE [ PREPARE ] { name | ALL }\u003c/pre\u003e\u003csection\u003e\u003ch2\u003e描述\u003c/h2\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003eDEALLOCATE\u003c/code\u003e 用于释放一个先前准备好的 SQL 语句。如果不显式释放预备语句，则它会在会话结束时被释放。\n  \u003c/p\u003e\u003cp\u003e\n   更多关于预备语句的信息，请参见 \u003ca class=\"xref\" href=\"/zh/docs/18/sql-prepare.html\" title=\"PREPARE\"\u003e\u003cspan class=\"refentrytitle\"\u003ePREPARE\u003c/span\u003e\u003c/a\u003e。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e参数\u003c/h2\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003ePREPARE\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      此关键字会被忽略。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      要释放的预备语句的名称。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eALL\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      释放所有预备语句。\n     \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e兼容性\u003c/h2\u003e\u003cp\u003e\n   SQL 标准中包含一个 \u003ccode class=\"command\"\u003eDEALLOCATE\u003c/code\u003e 语句，但它只用于嵌入式 SQL。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e另见\u003c/h2\u003e\u003cspan class=\"simplelist\"\u003e\u003ca class=\"xref\" href=\"/zh/docs/18/sql-execute.html\" title=\"EXECUTE\"\u003e\u003cspan class=\"refentrytitle\"\u003eEXECUTE\u003c/span\u003e\u003c/a\u003e, \u003ca class=\"xref\" href=\"/zh/docs/18/sql-prepare.html\" title=\"PREPARE\"\u003e\u003cspan class=\"refentrytitle\"\u003ePREPARE\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","file":"sql-deallocate.html","lang":"en","name":"DEALLOCATE","purpose":"deallocate a prepared statement","purpose_zh":"释放一个预备语句","related":["execute","prepare"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eDEALLOCATE\u003c/code\u003e 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.\u003c/p\u003e\u003cp\u003eFor more information on prepared statements, see \u003ca href=\"/docs/18/sql-prepare.html\" title=\"PREPARE\"\u003e\u003cspan class=\"refentrytitle\"\u003ePREPARE\u003c/span\u003e\u003c/a\u003e.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003ePREPARE\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThis key word is ignored.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the prepared statement to deallocate.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eALL\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eDeallocate all prepared statements.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eThe SQL standard includes a \u003ccode class=\"command\"\u003eDEALLOCATE\u003c/code\u003e statement, but it is only for use in embedded SQL.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/execute/?v=18\" title=\"EXECUTE\"\u003e\u003cspan class=\"refentrytitle\"\u003eEXECUTE\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/prepare/?v=18\" title=\"PREPARE\"\u003e\u003cspan class=\"refentrytitle\"\u003ePREPARE\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","slug":"18","synopsis_html":"DEALLOCATE [ PREPARE ] { \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e | ALL }","synopsis_text":"DEALLOCATE [ PREPARE ] { name | ALL }","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/sql-deallocate.html","sha256":"cfd683a396261632eb200677a816bdc5592b770b36a745a81c2703ea6fd7562c"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{},"MeasuredEvidence":{}},"Text":{"Collection":"sql","Key":"deallocate","SourceDatabase":"center","Version":"18","Locale":"en","Title":"DEALLOCATE","Summary":"deallocate a prepared statement","BodyHTML":"\u003cpre\u003eDEALLOCATE [ PREPARE ] { name | ALL }\u003c/pre\u003e\u003csection\u003e\u003ch2\u003eDescription\u003c/h2\u003e\u003cp\u003e\u003ccode\u003eDEALLOCATE\u003c/code\u003e 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.\u003c/p\u003e\u003cp\u003eFor more information on prepared statements, see \u003ca href=\"/docs/18/sql-prepare.html\" title=\"PREPARE\" rel=\"nofollow\"\u003e\u003cspan\u003ePREPARE\u003c/span\u003e\u003c/a\u003e.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eParameters\u003c/h2\u003e\u003cdiv\u003e\u003cdl\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003ePREPARE\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThis key word is ignored.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the prepared statement to deallocate.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003eALL\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eDeallocate all prepared statements.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eCompatibility\u003c/h2\u003e\u003cp\u003eThe SQL standard includes a \u003ccode\u003eDEALLOCATE\u003c/code\u003e statement, but it is only for use in embedded SQL.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eSee Also\u003c/h2\u003e\u003cspan\u003e\u003ca href=\"/wiki/sql/execute/?v=18\" title=\"EXECUTE\" rel=\"nofollow\"\u003e\u003cspan\u003eEXECUTE\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/prepare/?v=18\" title=\"PREPARE\" rel=\"nofollow\"\u003e\u003cspan\u003ePREPARE\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","SourceRevision":"wiki-repair-20261023:72607ee5bbb79b9a69e787d8ae4cf16d689b86dcbbc684de372d2407f542f4d6","ContentHash":"bc42bfb5b657431ef1ce0077b42ab6c6a93e56a398ff601d8e9decd078064463","Payload":{"related":["execute","prepare"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eDEALLOCATE\u003c/code\u003e 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.\u003c/p\u003e\u003cp\u003eFor more information on prepared statements, see \u003ca href=\"/docs/18/sql-prepare.html\" title=\"PREPARE\"\u003e\u003cspan class=\"refentrytitle\"\u003ePREPARE\u003c/span\u003e\u003c/a\u003e.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003ePREPARE\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThis key word is ignored.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the prepared statement to deallocate.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eALL\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eDeallocate all prepared statements.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eThe SQL standard includes a \u003ccode class=\"command\"\u003eDEALLOCATE\u003c/code\u003e statement, but it is only for use in embedded SQL.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/execute/?v=18\" title=\"EXECUTE\"\u003e\u003cspan class=\"refentrytitle\"\u003eEXECUTE\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/prepare/?v=18\" title=\"PREPARE\"\u003e\u003cspan class=\"refentrytitle\"\u003ePREPARE\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","synopsis_html":"DEALLOCATE [ PREPARE ] { \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e | ALL }","synopsis_text":"DEALLOCATE [ PREPARE ] { name | ALL }"}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
