From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Antonin Houska <ah@cybertec.at>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: refactor ExecGrant_*() functions
Date: Tue, 13 Dec 2022 07:54:07 +0100
Message-ID: <21375e35-07a2-a60e-c36e-286a46c9fc47@enterprisedb.com> (raw)
In-Reply-To: <3473.1670838279@antos>
References: <22c7e802-4e7d-8d87-8b71-cba95e6f4bcf@enterprisedb.com>
<24706.1670316118@antos>
<4395c0b0-3938-5d87-27d1-cc99766745ce@enterprisedb.com>
<3473.1670838279@antos>
On 12.12.22 10:44, Antonin Houska wrote:
> Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
>
>> On 06.12.22 09:41, Antonin Houska wrote:
>>> Attached are my proposals for improvements. One is to avoid memory leak, the
>>> other tries to improve readability a little bit.
>>
>> I added the readability improvement to my v2 patch. The pfree() calls aren't
>> necessary AFAICT.
It's something to consider, but since this is a refactoring patch and
the old code didn't do it either, I think it's out of scope.
> I see that memory contexts exist and that the amount of memory freed is not
> huge, but my style is to free the memory explicitly if it's allocated in a
> loop.
>
> v2 looks good to me.
Committed, thanks.
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-hackers@postgresql.org
Cc: peter.eisentraut@enterprisedb.com, ah@cybertec.at
Subject: Re: refactor ExecGrant_*() functions
In-Reply-To: <21375e35-07a2-a60e-c36e-286a46c9fc47@enterprisedb.com>
References: <22c7e802-4e7d-8d87-8b71-cba95e6f4bcf@enterprisedb.com> <24706.1670316118@antos> <4395c0b0-3938-5d87-27d1-cc99766745ce@enterprisedb.com> <3473.1670838279@antos> <21375e35-07a2-a60e-c36e-286a46c9fc47@enterprisedb.com>
* 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