Skip site navigation (1) Skip section navigation (2)

Grant RULE removed in pg 8.2

From: Erwin Brandstetter <brandstetter(at)falter(dot)at>
To: pgadmin-support(at)postgresql(dot)org
Subject: Grant RULE removed in pg 8.2
Date: 2007-03-05 20:30:07
Message-ID: 45EC7DCF.40304@falter.at (view raw or flat)
Thread:
Lists: pgadmin-support
Hi developers! Hi Dave!

Testing pgAdmin III v1.6.2 rev: 5837, client Win XP, hosts: Debian 
Sarge, PG 8.1.8 and  Debian Etch, PG 8.2.3.
Testing pgAdmin III v1.6.3 rev: 5941, client Win XP, hosts: Debian 
Sarge, PG 8.1.8 and  Debian Etch, PG 8.2.3.

I have come across a peculiarity concerning the RULE privilege.

In pg 7.4 or 8.1, the right to create rules on a table is a separate 
privilege. This was removed in pg 8.2. I quote the release notes:
http://www.postgresql.org/docs/8.2/static/release-8-2.html

    * Remove RULE permission for tables, for security reasons (Tom)
      As of this release, only a table's owner can create or modify
      rules for the table. For backwards compatibility, GRANT/REVOKE
      RULE is still accepted, but it does nothing.

This has side effects on pgAdmin. Properties dialogue for tables / views 
in a pg 8.2 database still shows the RULE privilege which, naturally, is 
never checked.
Granting the rule privilege seems to succeed, though it does (and can) not.
After issuing
    GRANT ALL ON TABLE mytable TO postgres;
the RULE privilege is still not checked in the properties dialogue and 
the SQL definiton reads:
    GRANT SELECT, UPDATE, INSERT, DELETE, REFERENCES, TRIGGER ON TABLE 
mytaqble TO postgres;

If I do the same in a pg 8.1 database I get the preferrable form of
    GRANT ALL ON TABLE mytable TO postgres;
pg_dump creates the same line of code.

I seem to remember mention of version-specific settings, but I don't 
really know about that. Is it possible for you to remove the RULE 
privilege in pgAdmin for DB-clusters >= v8.2?


Regards
Erwin

Responses

pgadmin-support by date

Next:From: Dave PageDate: 2007-03-06 09:25:30
Subject: Re: Grant RULE removed in pg 8.2
Previous:From: Sabin CoandaDate: 2007-03-05 15:04:25
Subject: pgAgent jobs by script

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group