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

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

百科 / psql 命令 / 查询执行

\bind_named

\bind_named 等同于 \bind ,不同之处在于它把现有预备语句的名称作为第一个参数。空字符串表示未命名的预备语句。

当前查看 PostgreSQL 18。

中文定义与说明

\bind_named 等同于 \bind,不同之处在于它把现有预备语句的名称作为第一个参数。空字符串表示未命名的预备语句。

示例:

INSERT INTO tbls1 VALUES ($1, $2) \parse stmt1
\bind_named stmt1 'first value' 'second value' \g

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

说明

\bind_named 等同于 \bind ,不同之处在于它把现有预备语句的名称作为第一个参数。空字符串表示未命名的预备语句。

客户端
psql 18.7
区分大小写的写法
\bind_named

用法

\bind_named statement_name [ parameter ] ...

本版手册中的写法

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

手册定义

\bind_named 等同于 \bind,不同之处在于它把现有预备语句的名称作为第一个参数。空字符串表示未命名的预备语句。

示例:

INSERT INTO tbls1 VALUES ($1, $2) \parse stmt1
\bind_named stmt1 'first value' 'second value' \g

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

相关条目

文档与源码

来源构建
版本
18.7
构建
https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2
来源指纹
1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915

版本比较

PostgreSQL 17 → 18: 新增收录。

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

--- PostgreSQL 17
+++ PostgreSQL 18
@@ -1 +1,8 @@
-该版未收录
+{
+  "definition": "\\bind_named is equivalent to \\bind , except that it takes the name of an existing prepared statement as first parameter. An empty string denotes the unnamed prepared statement. Example: INSERT INTO tbls1 VALUES ($1, $2) \\parse stmt1 \\bind_named stmt1 'first value' 'second value' \\g This command causes the extended query protocol (see Section 54.1.2 ) 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": "\\bind_named statement_name [ parameter ] ...",
+  "spellings": [
+    "\\bind_named"
+  ]
+}

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

相关条目

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