Re: BUG #14613: Referencing foreign key needs privileges of table owner?

From: Hisahiro Kauchi <hkauchi(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14613: Referencing foreign key needs privileges of table owner?
Date: 2017-04-06 03:32:05
Message-ID: 70a46d27-8ae3-c0bb-5645-a2e070dfcc81@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On 2017/04/06 12:00, Tom Lane wrote:
>> revoke all on schema public from public; // To prevent creation of
>> objects.
>
> You realize that that's much more draconian than needed to prevent
> creation of objects? In particular, you've left user1 unable to
> reference the table it owns, which hardly seems like a useful
> arrangement.

Yes, I had done too much... :(
But I thought user2 had enough permissions, so I asked a question.

> This is not a bug. That foreign key check query is executed as the owner
> of table1. If it were not, you'd probably be complaining about some
> other permissions problem.

I understood.

Thanks!

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2017-04-06 08:56:58 Re: Money type does not detect over/underflow unlike int/int8
Previous Message Tom Lane 2017-04-06 03:00:36 Re: BUG #14613: Referencing foreign key needs privileges of table owner?