Re: [PATCH] Add error message for out-of-memory in passwordFromFile()

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Joshua Shanks <jjshanks@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2025-11-04T11:17:02Z
Lists: pgsql-hackers
On Mon, Nov 03, 2025 at 09:15:25PM -0800, Joshua Shanks wrote:
> Thank you for the detailed feedback! This is my first C project
> contribution, so I really appreciate you taking the time to explain the
> proper error handling pattern.

No problem.  Applied on HEAD after a few tweaks:
* two libpq_gettext() added,
* *errmsg set to NULL when entering passwordFromFile().
* Some rewords.
--
Michael

Commits

  1. libpq: Improve error handling in passwordFromFile()