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
Hi,
I looked at v2-Allow-user-name-mapping-with-LDAP.patch and src/backend/postmaster/postmaster.c in master branch but didn't find what you mentioned.