Comment for UserMappingPasswordRequired in contrib/postgres_fdw
Etsuro Fujita <etsuro.fujita@gmail.com>
From: Etsuro Fujita <etsuro.fujita@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-02-18T20:23:26Z
Lists: pgsql-hackers
Attachments
- comment-fix.patch (application/octet-stream) patch
Hi,
While working on something else, I noticed $SUBJECT:
/*
* Return true if the password_required is defined and false for this user
* mapping, otherwise false. The mapping has been pre-validated.
*/
static bool
UserMappingPasswordRequired(UserMapping *user)
{
ListCell *cell;
foreach(cell, user->options)
{
DefElem *def = (DefElem *) lfirst(cell);
if (strcmp(def->defname, "password_required") == 0)
return defGetBoolean(def);
}
return true;
}
I think the former part of the comment should be: Return *false* if
the password_required is defined and false for this user mapping,
otherwise *true*.
Patch attached.
Best regards,
Etsuro Fujita
Commits
-
postgres_fdw: Fix thinko in comment for UserMappingPasswordRequired().
- e72bde9017c0 14.23 landed
- cf370919a996 15.18 landed
- e0fd58a84199 16.14 landed
- 596a400df7a2 17.10 landed
- be37f270d764 18.4 landed
- e7b97a22383a 19 (unreleased) landed