From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: m7onov@gmail.com <m7onov@gmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Cascade view drop permission checks
Date: Wed, 06 Apr 2022 09:48:41 -0400
Message-ID: <3035285.1649252921@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwaQMKOKWBgr8NpryicckXcejzXw4ymQS-aABcm1qqz3=w@mail.gmail.com>
References: <CAP8_6Xb2uvNcCzgm92hZS6b_DXTWmm6q96LE2mxDMOs3a_zbpQ@mail.gmail.com>
<CAKFQuwaQMKOKWBgr8NpryicckXcejzXw4ymQS-aABcm1qqz3=w@mail.gmail.com>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Tuesday, April 5, 2022, m7onov@gmail.com <m7onov@gmail.com> wrote:
>> It seems strange to me that somebody who is not a member of owner role can
>> drop an object bypassing permission checks.
>> Is this behaviour OK?
> The system dropped the now defunct view, not alice. Bob accepted that risk
> by basing the view on an object owned by another role. I suppose other
> behaviors are possible but not really worth exploring.
(a) this behavior is what is required by the SQL standard.
(b) what other behavior would be better? Dropping the table and
leaving a broken view behind isn't good. Neither is refusing to
let the owner drop her object.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, m7onov@gmail.com
Subject: Re: Cascade view drop permission checks
In-Reply-To: <3035285.1649252921@sss.pgh.pa.us>
References: <CAP8_6Xb2uvNcCzgm92hZS6b_DXTWmm6q96LE2mxDMOs3a_zbpQ@mail.gmail.com> <CAKFQuwaQMKOKWBgr8NpryicckXcejzXw4ymQS-aABcm1qqz3=w@mail.gmail.com> <3035285.1649252921@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox