Postgres CLI查询不执行

我在本教程教程的帮助下,在我的Ubuntu操作系统上安装了postgresql。

我遵循前几个步骤,我需要创buildangular色,但我的查询不执行,甚至没有任何select查询,它只是移动到下一行没有任何错误。

这似乎在尝试创build新angular色时适用于我

createuser test_user 

但在创build用户后,这些选项不会提示我

 Shall the new role be a superuser? (y/n) n Shall the new role be allowed to create databases? (y/n) n Shall the new role be allowed to create more new roles? (y/n) n 

我不能改变这些用户的权限,因为我的查询没有得到执行不会得到任何错误。

但在创建用户后,这些选项不会提示我

最近的PostgreSQL客户端这是正常的。 添加--interactive选项以提示您的教程使用的旧版本的选项。

从手册:

  --interactive Prompt for the user name if none is specified on the command line, and also prompt for whichever of the options -d/-D, -r/-R, -s/-S is not specified on the command line. (This was the default behavior up to PostgreSQL 9.1.) 

关于不执行的查询:

我的查询不执行,甚至没有任何选择查询,它只是移动到下一行没有任何错误

你可能忘记用分号完成查询。 或者,查询有一个不平衡的简单或双引号,解释器等待您关闭引用部分。 如果您需要更多关于此的帮助,请使用您在psql显示的内容的完全复制粘贴编辑您的问题。 在psql的提示揭示了它在什么状态,以及它在等待什么。