Re: [PATCH] Support pg_ident mapping for LDAP

From: Jacob Champion <pchampion(at)vmware(dot)com>
To: "zyu(at)yugabyte(dot)com" <zyu(at)yugabyte(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Support pg_ident mapping for LDAP
Date: 2021-09-01 20:56:21
Message-ID: b1043a64468166d568bee4a183903f91c1e78fc0.camel@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2021-09-01 at 12:59 -0700, Zhihong Yu wrote:
> + if (strcmp(val, "1") == 0)
> + hbaline->ldap_map_dn = true;
> + else
> + hbaline->ldap_map_dn = false;
>
> The above can be shortened as:
>
> hbaline->ldap_map_dn = strcmp(val, "1") == 0;

I usually prefer simplifying those conditionals, too, but in this case
I think it'd be a pretty big departure from the existing style. See for
example the handling of include_realm and compat_realm just after this
hunk.

--Jacob

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhihong Yu 2021-09-01 21:20:39 Re: [PATCH] Support pg_ident mapping for LDAP
Previous Message Tom Lane 2021-09-01 20:42:49 Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails