Re: "has_column_privilege()" issue with attnums and non-existent columns

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Chengxi Sun <sunchengxi(at)highgo(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Ian Barwick <barwick(at)gmail(dot)com>, David Steele <david(at)pgmasters(dot)net>
Subject: Re: "has_column_privilege()" issue with attnums and non-existent columns
Date: 2021-03-30 20:20:39
Message-ID: 3859884a-bc1a-37a8-78d9-3dec5b002360@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/30/21 3:37 PM, Joe Conway wrote:
> On 3/21/21 12:27 PM, Tom Lane wrote:
>> I think we may have to adjust the acl.c APIs, or maybe better provide new
>> entry points, so that we can have variants of pg_xxx_aclcheck that won't
>> throw a hard error upon not finding the row. We cheesily tried to avoid
>> adjusting those APIs to support the semantics we need here, and we now see
>> that it didn't really work.
>
> Ok, I took a shot at that; see attached.

Heh, I missed the forest for the trees it seems.

That version undid the changes fixing what Ian was originally complaining about.

New version attached that preserves the fixed behavior.

> Questions:
> 1. I confined the changes to just pg_class_aclcheck/mask
> and pg_attribute_aclcheck/mask -- did you intend
> that we do this same change across the board? Or
> perhaps do the rest of them once we open up pg15
> development?
>
> 2. This seems more invasive than something we would want
> to back patch -- agreed?

The questions remain...

Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

Attachment Content-Type Size
has_column_privilege-attnum-fix-jec.02.patch text/x-patch 11.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikita Glukhov 2021-03-30 20:25:10 Re: SQL/JSON: JSON_TABLE
Previous Message Tom Lane 2021-03-30 20:11:00 Re: "has_column_privilege()" issue with attnums and non-existent columns