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

From Zhihong Yu
Subject Re: [PATCH] Support pg_ident mapping for LDAP
Date
Msg-id CALNJ-vRQpSkineEB_YB9m64GBMLinF=j6zuUHOhpfgMFjWKMWw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Support pg_ident mapping for LDAP  (Jacob Champion <pchampion@vmware.com>)
Responses Re: [PATCH] Support pg_ident mapping for LDAP
List pgsql-hackers


On Wed, Sep 1, 2021 at 11:43 AM Jacob Champion <pchampion@vmware.com> wrote:
On Wed, 2021-09-01 at 15:42 +0000, Jacob Champion wrote:
> The cfbot found a failure in postgres_fdw, which I completely neglected
> in my design. I think the desired functionality should be to allow the
> ldapuser connection option during CREATE USER MAPPING but not CREATE
> SERVER.

Fixed in v2, attached.

--Jacob
Hi,

+       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;

Cheers

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: PoC/WIP: Extended statistics on expressions
Next
From: Andrew Dunstan
Date:
Subject: Re: Postgres Win32 build broken?