From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Leland Weathers <leland@lcweathers.net>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Permission denied on schema for all users on insert to table with fk
Date: Thu, 26 Jul 2018 07:19:20 -0700
Message-ID: <67f4fb8e-e314-8c08-e13a-08f273fd58d8@aklaver.com> (raw)
In-Reply-To: <CAHeq4YxLX3QJoGewGB1QvnrXH_ChsW4XJg8KfRV8j045oDiJsA@mail.gmail.com>
References: <CA+QX6VWofLQLC9FP3mCeyczy7_w8m8mGGxKejiRcrBEqdNosyg@mail.gmail.com>
<0357d12a-2b1e-14ac-b9b5-7b0062c529fc@aklaver.com>
<CAHeq4Yw-ZLs+W1y38ejFeRCLQsa+mjjxVQLdmEovr9cmi8+pUg@mail.gmail.com>
<e28ab19a-27eb-e98a-d696-6c31c8ac7610@aklaver.com>
<CAHeq4YxLX3QJoGewGB1QvnrXH_ChsW4XJg8KfRV8j045oDiJsA@mail.gmail.com>
On 07/26/2018 06:57 AM, Leland Weathers wrote:
>
>
> Before you mentioned a trigger. I am not seeing that in the schema
> you sent. Is there one and if so what is it's definition and that of
> its associated function?
>
>
> I was referring to the "built-in" PostgreSQL system trigger for
> validating fk constraints are met. The trigger that uses the "SELECT 1
> FROM ONLY..." query. That particular query which the logs say I don't
> have permissions to execute is not part of my schema/code.
>
>
> What does show?:
>
> select session_user, current_user;
>
>
> For this particular example, the session_user is: lw, current_user is
> dba (database and schema owner role)
So if I am following neither of these roles have permissions on the
tables. Is that correct?
If you try the INSERT as system_admin, jb or gb does it work?
>
>
> INSERT INTO results.historyitem
> (batchid,datasourceid,sequence_order) VALUES (6,20,1);
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
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: adrian.klaver@aklaver.com, leland@lcweathers.net
Subject: Re: Permission denied on schema for all users on insert to table with fk
In-Reply-To: <67f4fb8e-e314-8c08-e13a-08f273fd58d8@aklaver.com>
References: <CA+QX6VWofLQLC9FP3mCeyczy7_w8m8mGGxKejiRcrBEqdNosyg@mail.gmail.com> <0357d12a-2b1e-14ac-b9b5-7b0062c529fc@aklaver.com> <CAHeq4Yw-ZLs+W1y38ejFeRCLQsa+mjjxVQLdmEovr9cmi8+pUg@mail.gmail.com> <e28ab19a-27eb-e98a-d696-6c31c8ac7610@aklaver.com> <CAHeq4YxLX3QJoGewGB1QvnrXH_ChsW4XJg8KfRV8j045oDiJsA@mail.gmail.com> <67f4fb8e-e314-8c08-e13a-08f273fd58d8@aklaver.com>
* 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