Re: [PATCH] Support pg_ident mapping for LDAP - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: [PATCH] Support pg_ident mapping for LDAP
Date
Msg-id b1043a64468166d568bee4a183903f91c1e78fc0.camel@vmware.com
Whole thread Raw
In response to Re: [PATCH] Support pg_ident mapping for LDAP  (Zhihong Yu <zyu@yugabyte.com>)
Responses Re: [PATCH] Support pg_ident mapping for LDAP  (Zhihong Yu <zyu@yugabyte.com>)
List 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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails
Next
From: Zhihong Yu
Date:
Subject: Re: [PATCH] Support pg_ident mapping for LDAP