我想生成一个帮助指令,其文本取决于连接参数。尝试使用大括号表达式不起作用。
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all trust
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust
这怎么办?
答案 0 :(得分:1)
不可能像您尝试的那样直接进行操作,但是您可以使用RPC。
介绍如何使用RPC:
"rpc://rpcGetInputParams"
{
"response": {
"output": [
{
"type": "text",
"label":"Relative URL",
"name":"URL",
"help":"Enter a path relative to `{{connection.workspaceUrl}}`.",
}
]
}
}
(可以在不调用第三方服务的情况下调用RPC。更多信息here。)