使用交互式终端=>
时,命令提示符有时会在->
和psql
之间切换。我不清楚这表明了什么。
例如,
$ psql postgres
psql (9.5.10)
Type "help" for help.
postgres=> /h
postgres->
答案 0 :(得分:5)
当您看到->
时,它会让用户知道当前行是不完整语句的延续。上一个命令未正确结束。换句话说,它正在等待您使用;
结束语句。请参阅分为三个不同行的查询示例。在我用分号结束语句之前,它不会运行我的查询。
test=> select * from
test-> pg_catalog.pg_tables
test-> where tablename='test';
schemaname | tablename | tableowner | tablespace | hasindexes
------------+-----------+------------+------------+-----------,
(0 rows)