public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ranier Vilela <[email protected]>
To: Daniel Gustafsson <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Additional minor pg_dump cleanups
Date: Wed, 3 Jul 2024 08:29:15 -0300
Message-ID: <CAEudQAp2hFVsgQX2thwBMZLpp6_2gSh9StMHeCMRtQR+OtEo9w@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Em qua., 3 de jul. de 2024 às 04:37, Daniel Gustafsson <[email protected]>
escreveu:
> Re-reading Nathans recent 8213df9effaf I noticed a few more small things
> which
> can be cleaned up. In two of the get<Object> functions we lack a
> fast-path for
> when no tuples are found which leads to pg_malloc(0) calls. Another thing
> is
> that we in one place reset the PQExpBuffer immediately after creating it
> which
> isn't required.
>
0001 Looks good to me.
0002:
With the function *getPublications* I think it would be good to free up the
allocated memory?
}
+ pg_free(pubinfo);
+cleanup:
PQclear(res);
With the function *getExtensions* I think it would be good to return NULL
in case ntups = 0?
Otherwise we may end up with an uninitialized variable.
- ExtensionInfo *extinfo;
+ ExtensionInfo *extinfo = NULL;
Funny, the function *getExtensionMembership* does not use the parameter
ExtensionInfo extinfo.
getExtensions does not have another caller, Is it really necessary?
best regards,
Ranier Vilela
view thread (2+ messages)
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Additional minor pg_dump cleanups
In-Reply-To: <CAEudQAp2hFVsgQX2thwBMZLpp6_2gSh9StMHeCMRtQR+OtEo9w@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox