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