pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make inherited TRUNCATE perform access permission checks on pare
Date: Thu, 30 Jan 2020 15:48:27 +0000
Message-ID: <E1ixC3P-0007lz-1S@gemulon.postgresql.org> (raw)

Make inherited TRUNCATE perform access permission checks on parent table only.

Previously, TRUNCATE command through a parent table checked the
permissions on not only the parent table but also the children tables
inherited from it. This was a bug and inherited queries should perform
access permission checks on the parent table only. This commit fixes
that bug.

Back-patch to all supported branches.

Author: Amit Langote
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/CAHGQGwFHdSvifhJE+-GSNqUHSfbiKxaeQQ7HGcYz6SC2n_oDcg@mail.gmail.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4b96c03a0a2a6bdf685a0bef9fff1fb5f04516aa

Modified Files
--------------
src/backend/commands/tablecmds.c         | 69 +++++++++++++++++++++++---------
src/test/regress/expected/privileges.out | 21 ++++++++++
src/test/regress/sql/privileges.sql      | 14 +++++++
3 files changed, 85 insertions(+), 19 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1ixC3P-0007lz-1S@gemulon.postgresql.org>
Permalink:  ../E1ixC3P-0007lz-1S@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ixC3P-0007lz-1S@gemulon.postgresql.org

 · 

reply

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-committers@postgresql.org
  Cc: fujii@postgresql.org
  Subject: Re: pgsql: Make inherited TRUNCATE perform access permission checks on pare
  In-Reply-To: <E1ixC3P-0007lz-1S@gemulon.postgresql.org>
  References: <E1ixC3P-0007lz-1S@gemulon.postgresql.org>

* 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