postgres 使用psql连接 输入:sudo su - postgres 在bash下输入:psql,下文出现postgres字样 在postgres后:输入:c 数据库名称,连接数据库 在数据库名#:输入查询语句或者其他sql语句