pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Battuello, Louis <louis.battuello@etasseo.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Foreign Key Validation after Reference Table Ownership Change
Date: Wed, 21 Mar 2018 13:39:16 -0400
Message-ID: <23491.1521653956@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwadYCNkn-q_OMHAVx=sSaTHyPbJLvxZgTo6j8w-FJ9HoA@mail.gmail.com>
References: <CAKFQuwZwsSAkGX+9EYwUH0bZ5eXcJ8UDy=TNc1GpHoi2=Qh_Qw@mail.gmail.com>
	<20180321083033.f495bf0537e129b62c3edf58e37f64ff.23347c6e15.mailapi@email02.godaddy.com>
	<CAKFQuwadYCNkn-q_OMHAVx=sSaTHyPbJLvxZgTo6j8w-FJ9HoA@mail.gmail.com>

"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




view thread (11+ messages)  latest in thread

Message-ID: <23491.1521653956@sss.pgh.pa.us>
Permalink:  ../23491.1521653956@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23491.1521653956@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, louis.battuello@etasseo.com
  Subject: Re: Foreign Key Validation after Reference Table Ownership Change
  In-Reply-To: <23491.1521653956@sss.pgh.pa.us>
  References: <CAKFQuwZwsSAkGX+9EYwUH0bZ5eXcJ8UDy=TNc1GpHoi2=Qh_Qw@mail.gmail.com> <20180321083033.f495bf0537e129b62c3edf58e37f64ff.23347c6e15.mailapi@email02.godaddy.com> <CAKFQuwadYCNkn-q_OMHAVx=sSaTHyPbJLvxZgTo6j8w-FJ9HoA@mail.gmail.com> <23491.1521653956@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox