Why grantor is owner in this case?

From: "donniehan" <donniehan(at)126(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Why grantor is owner in this case?
Date: 2009-12-25 08:58:45
Message-ID: hh1us5$4pk$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi guys,

I have a question about the grantor. Why the grantor is owner in the following case ? I think it should be postgres(dba).

postgres=# create user u1;
CREATE ROLE
postgres=# create user u2;
CREATE ROLE
postgres=# set session authorization u1;
SET
postgres=> create table u1_tb1(a int);
CREATE TABLE
postgres=> reset session authorization;
RESET
postgres=# grant update(a) on u1_tb1 to u2;
GRANT
postgres=# select attacl from pg_attribute where attname='a';
attacl
-----------
{u2=w/u1}
(4 rows)

From attacl "u2=w/u1", we can see the grantor is u1, but in fact the grantor is postgres, the dba of database.
Does anyone know why ? Or is that a bug?

--Dongni

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mark Morgan Lloyd 2009-12-25 13:06:28 Re: Updating from 8.2 to 8.4
Previous Message Scott Marlowe 2009-12-25 01:58:38 Re: date_trunc on date is immutable?