Re: Error from the foreign RDBMS on a foreign table I have no privilege on
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, euler@eulerto.com,
philflorent@hotmail.com, pgsql-hackers@lists.postgresql.org
Date: 2022-06-08T03:04:52Z
Lists: pgsql-hackers
Laurenz Albe <laurenz.albe@cybertec.at> writes: > On Wed, 2022-06-08 at 11:12 +0900, Kyotaro Horiguchi wrote: > RangeTblEntry *rte = root->simple_rte_array[i]; > aclcheck_error(ACLCHECK_NO_PRIV, > get_relkind_objtype(rte->relkind), > get_rel_name(rte->relid)); I think it's completely inappropriate for FDWs to be taking it on themselves to inject privilege checks. The system design is that that is checked at executor start; not before, not after. regards, tom lane