Re: ExecutorCheckPerms() hook - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ExecutorCheckPerms() hook
Date
Msg-id 11416.1274881802@sss.pgh.pa.us
Whole thread Raw
In response to Re: ExecutorCheckPerms() hook  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Responses Re: ExecutorCheckPerms() hook
List pgsql-hackers
KaiGai Kohei <kaigai@ak.jp.nec.com> writes:
> Hmm. If both REFERENCES and SELECT privilege are required to create
> a new FK constraint, why RI_Initial_Check() need to check SELECT
> permission prior to SPI_execute()?

> It eventually checks SELECT privilege during execution of the secondary
> query. It is unclear for me why we need to provide a slower fallback.

Because the queries inside the triggers are done with a different
current userid.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: mapping object names to role IDs
Next
From: Simon Riggs
Date:
Subject: Re: Synchronization levels in SR