Re: BUG #1610: rewrite rule and sequence - Mailing list pgsql-bugs

From Olleg Samoylov
Subject Re: BUG #1610: rewrite rule and sequence
Date
Msg-id 42689AA6.6080007@mipt.ru
Whole thread Raw
In response to Re: BUG #1610: rewrite rule and sequence  (Richard Huxton <dev@archonet.com>)
List pgsql-bugs
Richard Huxton wrote:
> That's not a bug, it's a feature (as they say). I suppose you could
> argue that a sequence only used by one table could inherit that
> table's permissions by default, but I can see problems when people
> reorder GRANT statements.
>
> HTH

It's not feature, it's bug. From postgresql documentation 33.4. Rules
and Privileges:
<quote> Relations that are used due to rules get checked against the
privileges of the rule owner, not the user invoking the rule. This means
that a user only needs the required privileges for the tables/views that
he names explicitly in his queries.</quote>

This dont' true for tables with serial fields.

--
Olleg Samoylov

pgsql-bugs by date:

Previous
From: "Sokolov Yura"
Date:
Subject: BUG #1614: Bug in contrib/btree_gist for text
Next
From: "Sokolov Yura"
Date:
Subject: BUG #1616: Inadequate behavior GIST (btree_gist) multicolumn: first not unique