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!