Re: has_table_privilege for a table in unprivileged schema causes an error - Mailing list pgsql-hackers

From Tom Lane
Subject Re: has_table_privilege for a table in unprivileged schema causes an error
Date
Msg-id 322.1535379593@sss.pgh.pa.us
Whole thread Raw
In response to Re: has_table_privilege for a table in unprivileged schema causesan error  (Yugo Nagata <nagata@sraoss.co.jp>)
List pgsql-hackers
Yugo Nagata <nagata@sraoss.co.jp> writes:
> Tom Lane <tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump test instability
Next
From: Peter Eisentraut
Date:
Subject: simplify index tuple descriptor initialization