pgsql: Fix bug in translate_col_privs_multilevel

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix bug in translate_col_privs_multilevel
Date: 2022-12-23 11:59:03
Message-ID: E1p8gha-0000MV-MP@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix bug in translate_col_privs_multilevel

Fix incorrect code which was trying to convert a Bitmapset of columns at
the attnums according to a parent table and transform them into the
equivalent Bitmapset with same attnums according to the given child table.
This code is new as of a61b1f748 and was failing to do the correct
translation when there was an intermediate parent table between 'rel' and
'top_parent_rel'.

Reported-by: Ranier Vilela
Author: Richard Guo, Amit Langote
Discussion: https://postgr.es/m/CAEudQArohfB_Gy%2BhcH2-bANUkxgjJiP%3DABq01_LgTNTbcNijag%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bbfdf7180de85f9e7e995ba00dddc58452b3ba4b

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 36 ++++++++++++++++++++++++++
contrib/postgres_fdw/sql/postgres_fdw.sql | 23 ++++++++++++++++
src/backend/optimizer/util/inherit.c | 22 +++++++---------
3 files changed, 68 insertions(+), 13 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2022-12-23 12:22:29 pgsql: Fix event trigger example
Previous Message Thomas Munro 2022-12-23 07:41:16 pgsql: Add WL_SOCKET_ACCEPT event to WaitEventSet API.