| From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: refactor ExecGrant_*() functions |
| Date: | 2022-12-08 09:26:35 |
| Message-ID: | 61bc3065-32d0-9d83-0b0f-a1cf329ba72c@enterprisedb.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 02.12.22 18:28, Andres Freund wrote:
> Hi,
>
> On 2022-12-02 08:30:55 +0100, Peter Eisentraut wrote:
>> From 200879e5edfc1ce93b7af3cbfafc1f618626cbe9 Mon Sep 17 00:00:00 2001
>> From: Peter Eisentraut <peter(at)eisentraut(dot)org>
>> Date: Fri, 2 Dec 2022 08:16:53 +0100
>> Subject: [PATCH] Refactor ExecGrant_*() functions
>>
>> Instead of half a dozen of mostly-duplicate ExecGrant_Foo() functions,
>> write one common function ExecGrant_generic() that can handle most of
>> them.
>
> I'd name it ExecGrant_common() or such instead - ExecGrant_generic() sounds
> like it will handle arbitrary things, which it doesn't. And, as you mention,
> we could implement e.g. ExecGrant_Language() as using ExecGrant_common() +
> additional checks.
Done
> Perhaps it'd be useful to add a callback to ExecGrant_generic() that can
> perform additional checks, so that e.g. ExecGrant_Language() can easily be
> implemented using ExecGrant_generic()?
Done. This allows getting rid of ExecGrant_Language and ExecGrant_Type
in addition to the previous patch.
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Refactor-ExecGrant_-functions.patch | text/plain | 34.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2022-12-08 09:27:25 | Re: refactor ExecGrant_*() functions |
| Previous Message | Alvaro Herrera | 2022-12-08 09:12:45 | Re: on placeholder entries in view rule action query's range table |