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

From Tom Lane
Subject Re: Foreign Key Validation after Reference Table Ownership Change
Date
Msg-id 23491.1521653956@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: Foreign Key Validation after Reference Table Ownership Change  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Foreign Key Validation after Reference Table Ownership Change  (Louis Battuello <louis.battuello@etasseo.com>)
List pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> 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.​

The point is you can't resolve a name like "schema_1.something" unless
you have USAGE on schema_1.  So the RI-checking query, which is run as
the owner of the table, fails at parse time.

            regards, tom lane


pgsql-general by date:

Previous
From: Louis Battuello
Date:
Subject: Re: Foreign Key Validation after Reference Table Ownership Change
Next
From: Louis Battuello
Date:
Subject: Re: Foreign Key Validation after Reference Table Ownership Change