Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-07-04 Thread Etsuro Fujita
On Fri, Jun 10, 2022 at 6:17 PM Laurenz Albe wrote: > On Fri, 2022-06-10 at 17:17 +0900, Etsuro Fujita wrote: > > > I am not sure if it worth adding to the documentation. I would never > > > have thought > > > of the problem if Phil hadn't brought it up. On the other hand, I was > > > surprise

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-10 Thread Phil Florent
...@eulerto.com ; philflor...@hotmail.com ; pgsql-hackers@lists.postgresql.org Subject: Re: Error from the foreign RDBMS on a foreign table I have no privilege on On Fri, 2022-06-10 at 17:17 +0900, Etsuro Fujita wrote: > > I am not sure if it worth adding to the documentation. I would

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-10 Thread Laurenz Albe
On Fri, 2022-06-10 at 17:17 +0900, Etsuro Fujita wrote: > > I am not sure if it worth adding to the documentation.  I would never have > >thought > > of the problem if Phil hadn't brought it up.  On the other hand, I was > > surprised > > to learn that permissions aren't checked until the executo

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-10 Thread Etsuro Fujita
On Fri, Jun 10, 2022 at 1:26 AM Laurenz Albe wrote: > On Thu, 2022-06-09 at 21:55 +0900, Etsuro Fujita wrote: > > However, I'm not 100% sure we really need to document > > something about this, because 1) this doesn't cause any actual > > problems, as you described, and 2) this is a pretty-excepti

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-09 Thread Laurenz Albe
On Thu, 2022-06-09 at 21:55 +0900, Etsuro Fujita wrote: > On Thu, Jun 9, 2022 at 9:49 AM Laurenz Albe wrote: > > On Wed, 2022-06-08 at 19:06 +0900, Etsuro Fujita wrote: > > > On Wed, Jun 8, 2022 at 2:51 PM Kyotaro Horiguchi > > > wrote: > > > > At Wed, 08 Jun 2022 07:05:09 +0200, Laurenz Albe >

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-09 Thread Etsuro Fujita
On Thu, Jun 9, 2022 at 9:49 AM Laurenz Albe wrote: > On Wed, 2022-06-08 at 19:06 +0900, Etsuro Fujita wrote: > > On Wed, Jun 8, 2022 at 2:51 PM Kyotaro Horiguchi > > wrote: > > > At Wed, 08 Jun 2022 07:05:09 +0200, Laurenz Albe > > > wrote in > > > > diff --git a/doc/src/sgml/postgres-fdw.sgml

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-08 Thread Laurenz Albe
On Wed, 2022-06-08 at 19:06 +0900, Etsuro Fujita wrote: > On Wed, Jun 8, 2022 at 2:51 PM Kyotaro Horiguchi > wrote: > > At Wed, 08 Jun 2022 07:05:09 +0200, Laurenz Albe > > wrote in > > > diff --git a/doc/src/sgml/postgres-fdw.sgml > > > b/doc/src/sgml/postgres-fdw.sgml > > > index b43d0aecba.

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-08 Thread Etsuro Fujita
On Wed, Jun 8, 2022 at 2:51 PM Kyotaro Horiguchi wrote: > At Wed, 08 Jun 2022 07:05:09 +0200, Laurenz Albe > wrote in > > I take Tom's comment above as saying that the current behavior is fine. > > So yes, perhaps some documentation would be in order: > > > > diff --git a/doc/src/sgml/postgres-f

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-07 Thread Kyotaro Horiguchi
At Wed, 08 Jun 2022 07:05:09 +0200, Laurenz Albe wrote in > I take Tom's comment above as saying that the current behavior is fine. > So yes, perhaps some documentation would be in order: > > diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml > index b43d0aecba..b4b7e3

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-07 Thread Laurenz Albe
On Wed, 2022-06-08 at 13:06 +0900, Kyotaro Horiguchi wrote: > At Wed, 08 Jun 2022 12:09:27 +0900 (JST), Kyotaro Horiguchi > wrote in > > At Wed, 08 Jun 2022 04:38:02 +0200, Laurenz Albe > > wrote in > > > If anything, it should be done in the FDW, because it is only necessary > > > if the >

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-07 Thread Kyotaro Horiguchi
At Tue, 07 Jun 2022 23:04:52 -0400, Tom Lane wrote in > Laurenz Albe 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-

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-07 Thread Kyotaro Horiguchi
At Wed, 08 Jun 2022 12:09:27 +0900 (JST), Kyotaro Horiguchi wrote in > At Wed, 08 Jun 2022 04:38:02 +0200, Laurenz Albe > wrote in > > If anything, it should be done in the FDW, because it is only necessary if > > the > > FDW calls the remote site during planning. > > > > The question is: i

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-07 Thread Kyotaro Horiguchi
At Wed, 08 Jun 2022 04:38:02 +0200, Laurenz Albe wrote in > If anything, it should be done in the FDW, because it is only necessary if the > FDW calls the remote site during planning. > > The question is: is this a bug in postgres_fdw that should be fixed? It's depends on what we think about a

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-07 Thread Tom Lane
Laurenz Albe 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 taki

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-07 Thread Laurenz Albe
On Wed, 2022-06-08 at 11:12 +0900, Kyotaro Horiguchi wrote: > At Tue, 07 Jun 2022 11:24:55 -0300, "Euler Taveira" wrote > in > > On Tue, Jun 7, 2022, at 12:03 AM, Laurenz Albe wrote: > > > On Sat, 2022-06-04 at 21:18 +, Phil Florent wrote: > > > > I opened an issue with an attached code on o

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-07 Thread Kyotaro Horiguchi
At Tue, 07 Jun 2022 11:24:55 -0300, "Euler Taveira" wrote in > > > On Tue, Jun 7, 2022, at 12:03 AM, Laurenz Albe wrote: > > On Sat, 2022-06-04 at 21:18 +, Phil Florent wrote: > > > I opened an issue with an attached code on oracle_fdw git page : > > > https://github.com/laurenz/oracle_fd

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-07 Thread Euler Taveira
On Tue, Jun 7, 2022, at 12:03 AM, Laurenz Albe wrote: > On Sat, 2022-06-04 at 21:18 +, Phil Florent wrote: > > I opened an issue with an attached code on oracle_fdw git page : > > https://github.com/laurenz/oracle_fdw/issues/534 > > Basically I expected to obtain a "no privilege" error from

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-06 Thread Laurenz Albe
On Sat, 2022-06-04 at 21:18 +, Phil Florent wrote: > I opened an issue with an attached code on oracle_fdw git page : > https://github.com/laurenz/oracle_fdw/issues/534 > Basically I expected to obtain a "no privilege" error from PostgreSQL when I > have no read privilege > on the postgres f