postgresql - 如何读取用户表中的记录?
问题描述
最近,我想使用 psql 命令行删除用户表中的记录,但是在删除任何记录之前,我无法使用以下命令获取其中的记录:
postgres=> select * from user;
But the system returns the DB owner only.
所以我想知道,表格内容是否被隐藏。
解决方案
上面使用的命令是检查数据库系统的内部用户。如果要检查客户端的外部用户,需要在表名上加上双引号。
postgres=> select * from "user";
然后将显示表格数据。
推荐阅读
- android - 应用程序的运行时权限
- python - 从视图 Django 中的请求函数调用函数
- javascript - How can I declare a global function to call an Angular service from the browser console?
- python - Pymel:删除空组后如何关闭 For 循环?
- angular - 使构建在生产中失败,但在开发模式下失败
- ios - 在其他网站中加载 iframe 时,cookie 禁用 ios Safari 中的错误
- java - 如何在 Android 中以编程方式更改菜单标题
- javascript - 是否可以使用 JavaScript 隐藏“控制台已清除”消息?
- python - 试图在 OpenCV 读取的图像上画线,但没有画线
- regex - Notepad ++如何在行尾附近替换或添加某个符号