Re: has_table_privilege for a table in unprivileged schema causes an error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: has_table_privilege for a table in unprivileged schema causes an error
Date: 2018-08-27 14:19:53
Message-ID: 322.1535379593@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> There's a backwards-compatibility argument for not changing this behavior,
>> sure, but I don't buy the other arguments you made here. And I don't
>> think there's all that much to the backwards-compatibility argument,
>> considering that the current behavior is to fail.

> With regarding to keeping the backwards-compatibility, to add a new paramater
> to has_*_privilege functions is a solution as proposed previously.
> has_table_privilege(user, table, privilege[, consider_schema=false])
> How do you think this proposal?

I think that'd be a disaster, because we already have variants of these
functions with several different parameter counts. Adding optional
arguments to them will cause ambiguous-function errors where there were
none before.

Also, it's just plain ugly. We should either decide we want this change,
or decide we don't. Trying to have it both ways is not going to be
better.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-08-27 14:25:28 simplify index tuple descriptor initialization
Previous Message Tom Lane 2018-08-27 14:11:35 Re: pg_dump test instability