Comment for UserMappingPasswordRequired in contrib/postgres_fdw - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Comment for UserMappingPasswordRequired in contrib/postgres_fdw
Date
Msg-id CAPmGK16pDnM_wU3kmquPj-M9MYqG3y0BdntRZ0eytqbCaFY3WQ@mail.gmail.com
Whole thread
Responses Re: Comment for UserMappingPasswordRequired in contrib/postgres_fdw
List 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

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Killing off anoncvs.postgresql.org
Next
From: Jacob Champion
Date:
Subject: Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta