首页 > 解决方案 > 如何读取用户表中的记录?

问题描述

最近,我想使用 psql 命令行删除用户表中的记录,但是在删除任何记录之前,我无法使用以下命令获取其中的记录:

postgres=> select * from user;

But the system returns the DB owner only.

所以我想知道,表格内容是否被隐藏。

标签: postgresqlpsql

解决方案


上面使用的命令是检查数据库系统的内部用户。如果要检查客户端的外部用户,需要在表名上加上双引号

postgres=> select * from "user"; 

然后将显示表格数据。


推荐阅读