[PATCH] libpq improvements and fixes

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] libpq improvements and fixes
Date: 2020-02-12 22:55:32
Message-ID: CAEudQAq+=nCwcM8BnKvcO_2MEgJrGeem9JiHxQWNchMDnSdcNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
Coverity detected a dead code in the src / interfaces / libpq / fe-auth.c
file, to correct it, a simplification was made and the oom_error goto was
removed, since it is clearly redundant and its presence can be confusing.

The second part of the patch refers to the file src / interfaces / libpq /
fe-exec.c.
First, a correction was made to the return types of some functions that
clearly return bool, but are defined as int.

According to some functions, they do a basic check and if they fail, they
return immediately, so it does not make sense to start communication and
then return.
It makes more sense to do the basic checks, only to start communicating
with the server afterwards.

These changes are passing the regression tests and are in use in libpq.dll,
used in production by my customers.

regards,
Ranier Vilela

Attachment Content-Type Size
libpq.patch application/octet-stream 7.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2020-02-13 00:23:41 Re: Unicode normalization SQL functions
Previous Message Michael Banck 2020-02-12 21:38:19 Re: Just for fun: Postgres 20?