输入:sudo su - postgres

在bash下输入:psql,下文出现postgres字样

postgres 使用psql连接

在postgres后:输入:\c 数据库名称,连接数据库

 postgres 使用psql连接

在数据库名#:输入查询语句或者其他sql语句

postgres 使用psql连接

 

相关文章:

  • 2022-12-23
  • 2021-07-16
  • 2021-11-24
  • 2022-12-23
  • 2021-06-26
  • 2021-12-02
  • 2021-05-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-17
  • 2021-10-26
  • 2021-12-26
  • 2022-02-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案