Re: Foreign Key Validation after Reference Table Ownership Change

From: Louis Battuello <louis(dot)battuello(at)etasseo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Foreign Key Validation after Reference Table Ownership Change
Date: 2018-03-21 17:48:15
Message-ID: 15ABBD1A-BCD6-400F-8F95-62E295A93C7A@etasseo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


>
> 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.

That certainly makes sense for user_2 that owns the reference table and is blocked by not having usage on the reference table’s schema.

But, user_1 owns both schemas and has usage on both but no longer owns the reference table in one schema. Why is user_1’s insert on the referencing table failing? Is the validation of the FK no longer done as user_1?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-03-21 17:51:41 Re: Foreign Key Validation after Reference Table Ownership Change
Previous Message Tom Lane 2018-03-21 17:39:16 Re: Foreign Key Validation after Reference Table Ownership Change