PostgreSQL 8.3权限未更新-用法错误? [英] PostgreSQL 8.3 privileges not updated - wrong usage?

查看:72
本文介绍了PostgreSQL 8.3权限未更新-用法错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在PostgreSQL 8.3中授予其他用户特权.尽管GRANT命令没有给我任何错误,但特权不显示.我需要冲洗"它们吗?

I'm having trouble granting privileges to another user in PostgreSQL 8.3. While the GRANT command gives me no error, the privileges do not show up. Do I need to "flush" them?

sirprize=# CREATE DATABASE testdb;
CREATE DATABASE
sirprize=# GRANT ALL PRIVILEGES ON DATABASE testdb TO testuser;
GRANT
sirprize=# \c testdb
You are now connected to database "testdb".
testdb=# \z
 Access privileges for database "testdb"
 Schema | Name | Type | Access privileges
--------+------+------+-------------------
(0 rows)

testdb=#

推荐答案

\z显示数据库中包含的对象的表,视图和序列权限.它不显示对数据库本身的权限.如果您在'testdb'中创建表或其他对象,它将显示在\z的输出中.

\z Shows your table, view, and sequence permissions, for the objects contained within the Database. It does not show permissions on the database itself. If you create a table or some other object within 'testdb', it will then show up in \z's output.

您可以使用\l(或\l+了解更多信息)查看系统上存在哪些数据库.

You can see which Databases exist on your system with \l (or \l+ for a bit more info).

请参见第9.22节. PostgreSQL 8.3手册中的内容,有关如何以编程方式确定用户在给定数据库上存在哪些权限的信息.

See section 9.22. of the PostgreSQL 8.3 manual for information about how to programatically determine which permissions exist for a user on a given database.

这篇关于PostgreSQL 8.3权限未更新-用法错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆