\parse
基于目标预备语句对象的名称,从当前查询缓冲区创建一个预备语句。空字符串表示未命名的预备语句。
当前查看 PostgreSQL 18.6。
说明
基于目标预备语句对象的名称,从当前查询缓冲区创建一个预备语句。空字符串表示未命名的预备语句。
- 客户端
- psql 18.6
- 区分大小写的写法
- \parse
用法
\parse statement_name本版手册中的写法
| 命令 | 手册中的后缀修饰符 |
|---|---|
| \parse | 此语法签名未列出 |
手册定义
\parsestatement_name-
基于目标预备语句对象的名称,从当前查询缓冲区创建一个预备语句。空字符串表示未命名的预备语句。
示例:
SELECT $1 \parse stmt1
此命令会使用扩展查询协议,不同于psql通常使用的简单查询协议。该命令会发出一条Parse (F)消息,因此可用于在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": "Creates a prepared statement from the current query buffer, based on the name of a destination prepared-statement object. An empty string denotes the unnamed prepared statement. Example: SELECT $1 \\parse stmt1 This command causes the extended query protocol to be used, unlike normal psql operation, which uses the simple query protocol. A Parse (F) message will be issued by this command so it can be useful to test the extended query protocol from psql . This command affects only the next query executed; all subsequent queries will use the simple query protocol by default.",
+ "modifiers": [],
+ "signature": "\\parse statement_name",
+ "spellings": [
+ "\\parse"
+ ]
+}
比较已记录的接口与属性,排除来源指纹和构建元数据。某个样本中没有记录,不能据此判断实际引入或移除的版本。
相关条目
导出 JSON · 返回psql 命令 · 收录范围为 PostgreSQL 18 至 20;最早采样版本不一定是实际引入版本。