Re: Re: Foreign Key Validation after Reference Table Ownership Change - Mailing list pgsql-general

From David G. Johnston
Subject Re: Re: Foreign Key Validation after Reference Table Ownership Change
Date
Msg-id CAKFQuwadYCNkn-q_OMHAVx=sSaTHyPbJLvxZgTo6j8w-FJ9HoA@mail.gmail.com
Whole thread Raw
In response to RE: Re: Foreign Key Validation after Reference Table Ownership Change  ("Battuello, Louis" <louis.battuello@etasseo.com>)
Responses Re: Foreign Key Validation after Reference Table Ownership Change  (Louis Battuello <louis.battuello@etasseo.com>)
Re: Foreign Key Validation after Reference Table Ownership Change  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Wed, Mar 21, 2018 at 8:30 AM, Battuello, Louis <louis.battuello@etasseo.com> wrote:
So, user_2 needs usage on the schema containing its newly owned reference table even though user_1 is performing the insert on a table in the other schema? Interesting. I though the validation was only dependent on user_1's ACL.

​It was the only thing that made sense, given the error, though I agree it seems a bit odd.​

I don't have time to experiment right now - but at a high level one would think user_2 would need usage and create on schema_1 in order to be the owner of an object in schema_1.  There is no possible way for it to actually create its own object there without such permissions - that a superuser can do so leaves a possibility for a non-superuser dump/restore problem.

Whether the system allows you too or not I'd advise the owner of objects within a schema either own the schema too or have usage and create permission thereon.

David J.

pgsql-general by date:

Previous
From: Alessandro Aste
Date:
Subject: Postgresql 10.3 , query never completes if LIMIT clause is specifiedand paralle processing is on
Next
From: Vincenzo Romano
Date:
Subject: Re: postgresql-10.3 on unbuntu-17.10 - how??