GRANT permissions on views have no effect; \dv reports nothing

Поиск
Список
Период
Сортировка
Искать

GRANT permissions on views have no effect; \dv reports nothing

От:
pgsql-bugs@postgresql.org
Дата:
Kristis Makris (kristis dot makris at datasoft dot com) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
GRANT permissions on views have no effect; \dv reports nothing

Long Description
I run a bunch if GRANT statements on tables/views/sequences. The permissions set on teh tables/sequences go in effect correctly. All the grant permissions performed on the views have no effect.

Doing a "\dp" within the pgsql tool does not even list the views, while the permissions on the tables/sequences are listed, even if there aren't any.

Also, doing a "\dv" within the pgsql tool does not list any views at all; it reports: "No relations found."

The views are not listed as relations anywhere, yet they are executed properly

Sample Code
perms=# create view test AS SELECT 'hi'::text AS RESULT;
CREATE
perms=# \dv
No relations found.
perms=# select * from test;
 result 
--------
 hi
(1 row)

perms=# \dp
Access permissions for database "perms"
 Relation | Access permissions 
----------+--------------------
(0 rows)

perms=# grant all ON test TO public;
CHANGE
perms=# \dp
Access permissions for database "perms"
 Relation | Access permissions 
----------+--------------------
(0 rows)

perms=# \dv
No relations found.
perms=# create table testtable(id int4);
CREATE
perms=# \dp
Access permissions for database "perms"
 Relation  | Access permissions 
-----------+--------------------
 testtable | 
(1 row)

perms=# grant all on testtable to public;
CHANGE
perms=# \dp
Access permissions for database "perms"
 Relation  |    Access permissions     
-----------+---------------------------
 testtable | {"=arwR","postgres=arwR"}
(1 row)

perms=# grant all ON test TO public;
CHANGE
perms=# \dp
Access permissions for database "perms"
 Relation  |    Access permissions     
-----------+---------------------------
 testtable | {"=arwR","postgres=arwR"}
(1 row)



No file was uploaded with this report

Re: GRANT permissions on views have no effect; \dv reports nothing

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
pgsql-bugs@postgresql.org writes:
> perms=# create view test AS SELECT 'hi'::text AS RESULT;
> CREATE
> perms=# \dv
> No relations found.

I'm betting that you're using a 7.0 psql with a 7.1 server,
or vice versa.

			regards, tom lane

PS: use a non-obfuscated reply address next time.
FAQ