Re: [PATCH] Support pg_ident mapping for LDAP
От | Zhihong Yu |
---|---|
Тема | Re: [PATCH] Support pg_ident mapping for LDAP |
Дата | |
Msg-id | CALNJ-vTrUoxeHnGP7rZLegrHB_0u42vkK2+wgp8drFbAkwgMYQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Support pg_ident mapping for LDAP (Jacob Champion <pchampion@vmware.com>) |
Ответы |
Re: [PATCH] Support pg_ident mapping for LDAP
|
Список | pgsql-hackers |
On Wed, Sep 1, 2021 at 1:56 PM Jacob Champion <pchampion@vmware.com> wrote:
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.
I still think my recommendation is concise.
Cheers
В списке pgsql-hackers по дате отправления: