↑↓ 选择 ↵ 打开 ⌫ 改范围 完整检索页

pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。

百科 / psql 命令 / 查询执行

\close_prepared

关闭指定的预备语句。空字符串表示未命名的预备语句。如果不存在该名称的预备语句,则不执行任何操作。

当前查看 PostgreSQL 18.6。

说明

关闭指定的预备语句。空字符串表示未命名的预备语句。如果不存在该名称的预备语句,则不执行任何操作。

客户端
psql 18.6
区分大小写的写法
\close_prepared

用法

\close_prepared prepared_statement_name

本版手册中的写法

命令手册中的后缀修饰符
\close_prepared此语法签名未列出

手册定义

\close_prepared prepared_statement_name

关闭指定的预备语句。空字符串表示未命名的预备语句。如果不存在该名称的预备语句,则不执行任何操作。

示例:

SELECT $1 \parse stmt1
\close_prepared stmt1

此命令会使用扩展查询协议,不同于psql通常使用的简单查询协议。因此,可以用它在psql中测试扩展查询协议。

相关条目

文档与源码

来源构建
版本
18.6
构建
https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2
来源指纹
ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8

版本比较

PostgreSQL 17 → 18: 新增收录。

以下差异保留原始字段名与英文源描述。

--- PostgreSQL 17
+++ PostgreSQL 18
@@ -1 +1,8 @@
-该版未收录
+{
+  "definition": "Closes the specified prepared statement. An empty string denotes the unnamed prepared statement. If no prepared statement exists with this name, the operation is a no-op. Example: SELECT $1 \\parse stmt1 \\close_prepared stmt1 This command causes the extended query protocol to be used, unlike normal psql operation, which uses the simple query protocol. So this command can be useful to test the extended query protocol from psql .",
+  "modifiers": [],
+  "signature": "\\close_prepared prepared_statement_name",
+  "spellings": [
+    "\\close_prepared"
+  ]
+}

比较已记录的接口与属性,排除来源指纹和构建元数据。某个样本中没有记录,不能据此判断实际引入或移除的版本。

相关条目

导出 JSON · 返回psql 命令 · 收录范围为 PostgreSQL 18 至 20;最早采样版本不一定是实际引入版本。