Re: [PATCH] Support pg_ident mapping for LDAP

Поиск
Список
Период
Сортировка
От Jacob Champion
Тема Re: [PATCH] Support pg_ident mapping for LDAP
Дата
Msg-id b1043a64468166d568bee4a183903f91c1e78fc0.camel@vmware.com
обсуждение исходный текст
Ответ на Re: [PATCH] Support pg_ident mapping for LDAP  (Zhihong Yu <zyu@yugabyte.com>)
Ответы Re: [PATCH] Support pg_ident mapping for LDAP  (Zhihong Yu <zyu@yugabyte.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails
Следующее
От: Zhihong Yu
Дата:
Сообщение: Re: [PATCH] Support pg_ident mapping for LDAP