postgresql数据库查询当前数据库、当前用户

来源:互联网 发布:51单片机流水灯接线图 编辑:程序博客网 时间:2024/05/22 03:16

1.查询当前数据库:

终端:\c

sql语句:select current_database();

2.查询当前用户:

终端:\c

sql语句:select user;  或者:select current_user;

原创粉丝点击