Comment for UserMappingPasswordRequired in contrib/postgres_fdw

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Comment for UserMappingPasswordRequired in contrib/postgres_fdw
Date: 2026-02-18 20:23:26
Message-ID: CAPmGK16pDnM_wU3kmquPj-M9MYqG3y0BdntRZ0eytqbCaFY3WQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
comment-fix.patch application/octet-stream 624 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2026-02-18 20:27:56 Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta
Previous Message Magnus Hagander 2026-02-18 20:05:42 Re: Killing off anoncvs.postgresql.org