[PATCH] libpq improvements and fixes - Mailing list pgsql-hackers

From Ranier Vilela
Subject [PATCH] libpq improvements and fixes
Date
Msg-id CAEudQAq+=nCwcM8BnKvcO_2MEgJrGeem9JiHxQWNchMDnSdcNQ@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] libpq improvements and fixes
List 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

pgsql-hackers by date:

Previous
From: Michael Banck
Date:
Subject: Re: Just for fun: Postgres 20?
Next
From: Andreas Karlsson
Date:
Subject: Re: Unicode normalization SQL functions