\set
设置 psql 变量 name 为 value ,如果给出多个值,则设置为所有值的连接。如果只给出一个参数,则将变量设置为空字符串值。要取消变量设置,请使用 \unset 命令。
当前查看 PostgreSQL 18。
中文定义与说明
说明
设置 psql 变量 name 为 value ,如果给出多个值,则设置为所有值的连接。如果只给出一个参数,则将变量设置为空字符串值。要取消变量设置,请使用 \unset 命令。
- 客户端
- psql 18.7
- 区分大小写的写法
- \set
用法
\set [ name [ value [ ... ] ] ]本版手册中的写法
| 命令 | 手册中的后缀修饰符 |
|---|---|
| \set | 此语法签名未列出 |
手册定义
相关条目
文档与源码
来源构建
- 版本
- 18.7
- 构建
- https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2
- 来源指纹
1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915
版本比较
PostgreSQL 12 → 13: 属性变化。
以下差异保留原始字段名与英文源描述。
--- PostgreSQL 12
+++ PostgreSQL 13
@@ -1,5 +1,5 @@
{
- "definition": "Sets the psql variable name to value , or if more than one value is given, to the concatenation of all of them. If only one argument is given, the variable is set to an empty-string value. To unset a variable, use the \\unset command. \\set without any arguments displays the names and values of all currently-set psql variables. Valid variable names can contain letters, digits, and underscores. See the section Variables below for details. Variable names are case-sensitive. Certain variables are special, in that they control psql 's behavior or are automatically set to reflect connection state. These variables are documented in Variables , below. Note This command is unrelated to the SQL command SET .",
+ "definition": "Sets the psql variable name to value , or if more than one value is given, to the concatenation of all of them. If only one argument is given, the variable is set to an empty-string value. To unset a variable, use the \\unset command. \\set without any arguments displays the names and values of all currently-set psql variables. Valid variable names can contain letters, digits, and underscores. See Variables below for details. Variable names are case-sensitive. Certain variables are special, in that they control psql 's behavior or are automatically set to reflect connection state. These variables are documented in Variables , below. Note This command is unrelated to the SQL command SET .",
"modifiers": [],
"signature": "\\set [ name [ value [ ... ] ] ]",
"spellings": [
比较已记录的接口与属性,排除来源指纹和构建元数据。某个样本中没有记录,不能据此判断实际引入或移除的版本。
相关条目
导出 JSON · 返回psql 命令 · 收录范围为 PostgreSQL 10 至 20;最早采样版本不一定是实际引入版本。