From: Antonin Houska <ah@cybertec.at>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: refactor ExecGrant_*() functions
Date: Mon, 12 Dec 2022 10:44:39 +0100
Message-ID: <3473.1670838279@antos> (raw)
In-Reply-To: <4395c0b0-3938-5d87-27d1-cc99766745ce@enterprisedb.com>
References: <22c7e802-4e7d-8d87-8b71-cba95e6f4bcf@enterprisedb.com>
<24706.1670316118@antos>
<4395c0b0-3938-5d87-27d1-cc99766745ce@enterprisedb.com>
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.
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.
--
Antonin Houska
Web: https://www.cybertec-postgresql.com
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: ah@cybertec.at, peter.eisentraut@enterprisedb.com
Subject: Re: refactor ExecGrant_*() functions
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>
* 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