gpt4 book ai didi

postgresql - PSQL 命令行结束从 => 改为 (>

转载 作者:行者123 更新时间:2023-11-29 14:09:04 26 4
gpt4 key购买 nike

我尝试执行从\e 命令编写的查询,但现在我无法执行任何查询,但可以在 PSQL 中执行命令。

the problem at hand

现在我注意到这一点,我输入的命令现在在\e 中。

state of \e

当我关闭\e(尝试运行它)时问题开始了。

最佳答案

psql 提示符根据它接下来期望的输入而变化。提示符为actually customisable, as documented here ,但 PROMPT2 的默认值(“在命令输入期间需要更多输入时发出”)包含 %R,其解释为:

In prompt 2 %R is replaced by a character that depends on why psql expects more input: - if the command simply wasn't terminated yet, but * if there is an unfinished /* ... */ comment, a single quote if there is an unfinished quoted string, a double quote if there is an unfinished quoted identifier, a dollar sign if there is an unfinished dollar-quoted string, or ( if there is an unmatched left parenthesis.

因此 (> 提示告诉您在查询的某处,您打开了一个 (,并且 psql 仍在等待在解析您的输入之前匹配 )

关于postgresql - PSQL 命令行结束从 => 改为 (>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51175680/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com