Re: about allow_system_table_mods and SET STATISTICS

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: about allow_system_table_mods and SET STATISTICS
Date: 2019-12-10 12:41:28
Message-ID: dfdb11ce-ddc7-0d7c-0b9f-4ec78eff3388@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-12-05 00:16, Tom Lane wrote:
> Seems reasonable. The argument for making this an exception to
> allow_system_table_mods was always more about expediency than logical
> cleanliness. After the recent changes I think it's okay to remove the
> special case (especially since nobody has griped about it being broken).
>
> However ... if we're not going to have that special case, couldn't
> we get rid of the whole business of having a special permissions test?
> What is it that ATSimplePermissions can't handle here? The business
> about requiring a colName certainly doesn't need to be done before the
> ownership check (in fact, it could be left to execution, so we don't need
> a prep function at all anymore).

Good point. Done in the attached patch.

(If someone wanted to revive the original functionality, it would
nowadays probably be easier to add a flag ATT_SYSTEM_TABLE to
ATSimplePermissions(), so there is really no reason to keep the old
function separate.)

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v2-0001-Remove-ATPrepSetStatistics.patch text/plain 4.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Karl O. Pinc 2019-12-10 12:56:33 Re: proposal: minscale, rtrim, btrim functions for numeric
Previous Message Peter Eisentraut 2019-12-10 12:18:31 Re: Unicode normalization test broken output