Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w8JRr-000PTb-2H for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Apr 2026 14:55:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w8JRq-006Weh-1n for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Apr 2026 14:55:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w8JRq-006WeZ-0p for pgsql-hackers@lists.postgresql.org; Thu, 02 Apr 2026 14:55:06 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w8JRo-00000000DXP-1fk0 for pgsql-hackers@postgresql.org; Thu, 02 Apr 2026 14:55:06 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-483487335c2so9628915e9.2 for ; Thu, 02 Apr 2026 07:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1775141704; x=1775746504; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=yyTE1+j2rH1XaBSaefoh3xYZ2ezGX/Hs+ftlnN/kUSk=; b=PDAzzD/b9Ca3dTQQb2T9zmyhZ8j2jKJP5wlb4aUY1oklXUdeOUbB1Cc/Z4fi0iV1A0 20Dl7BKvfCrQnoqmLo/BuFEi85jmlM+I3n3BPnUTzTYs+MjetP2FjH6Yxm3TF4E4oSyy 0J3UwxL9Ms30NPmmkwDEsbsb76TVnyqFnLHVr5Cpyiz18P/l/H+prQHovULOAeYd5GEl bIMz2n8u2ScsbUHPwrQK8jI20bTnlmglCmt8mQrhwSnE3fRb4Uc6p29O7OP9+ts1ej0R CWq5hv8b+dMw0obAfzEj15OfoLS0MNaUv+RLR/dcn4RWShdmjUbbKWngkFzo/UhzVof7 OR+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775141704; x=1775746504; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yyTE1+j2rH1XaBSaefoh3xYZ2ezGX/Hs+ftlnN/kUSk=; b=S0IBe4M7HJpXMXP7Vt3U/T5Ppc25kjD3UObohj1A34K9tPgoge2BFbMAtIxIU7oGVc X2u+CPfhj0qBIywh/GGnZVPDIYqwGIIo6H2ffuUoouXfJgphPWBsXYqVc2uEHYJX7MhY xQW6CrU+qmHlxLojjMe0TpO8c84pWhX0Oy2VcpdRJMRaJa7C/ovuC2+zgUJ9zzUiROuE N/72xhPoYtTX0QF2D9bM7QInfMNU83EG13CE9I+18WhXlPdFZRAnW6lf5zEL7KKJYtCT 8f70L6WmwHa0fWzR6M2y38H4QSMjCaRsCDvDzOXUeCKRZeo8wA1dVqChxos/ETIudbka uqGg== X-Gm-Message-State: AOJu0YypLu2tKTpFq2mq40boACjdTlHmhhadB6hKN8NgL4sJoYzyvJmg 4SDEWYoYjhYhK1udvJIm5U/o14zZwdeP33AsSWDEzhoFwa6QYt6J4jTQXi2ZxdPNIG4= X-Gm-Gg: ATEYQzwDSbmvOfBV2uRz6kv70SCtLzeo3WbNyMI2gfcbaMo6mex6DaCVEJ/CtpK5DEr tROk2YFL79D0HhA0RFUYEteiGFuPdOvj7HH36TUEbLwAIbv34ORJGEg5v2NtslhdkfLDlcSaKVO N+AqOXxb1Ljv3E8xO4SmDkNrtuXhb6jFyqBPfh66qRLTVH8BRUc2qyziCOHCkyeQ/K7FLgyLUpP cz2VW+Nox9HFZ7Z+O3vNsAVbkZhYykow/tfuzs3xaw+x+Lo0eW7XhbyHKBaNK5el7lop+NTnUC2 n9sS2ATz6V3mVoU/+BAf4NE3QwSe8pJhhSWlAaFITYZ7gnu8tBXDPrgurkaRr8HIjDb9v+OO9Gb ibCeD2AC799mH/ADtd/LRTFksBwNmEKi7Gbf58MobmoYvN3K2cvDGteaavhlpfgHzZ9xF75rdYX gd7buLEj7pytrzHnhRPfHRLo607knnaAM/YdIWK90rLHR12d7Fs2XS X-Received: by 2002:a05:600c:450f:b0:485:3f41:e113 with SMTP id 5b1f17b1804b1-48883568b16mr137965375e9.1.1775141703613; Thu, 02 Apr 2026 07:55:03 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:70:68f5:8578:40cb:9b82:28d1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4887e83e906sm188030025e9.8.2026.04.02.07.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2026 07:55:03 -0700 (PDT) Message-ID: <61724fbede15fd95ae29764037fbe71629a8f6d7.camel@cybertec.at> Subject: Re: Add ldapservice connection parameter From: Laurenz Albe To: Andrew Jackson Cc: pgsql-hackers , Roman Khapov , niushiji@gmail.com Date: Thu, 02 Apr 2026 16:55:02 +0200 In-Reply-To: References: <9FF1E1E8-D9EE-43C5-ADFA-7AE94BA57159@yandex-team.ru> <3e670a40754bb687d163f21d82af96f059f3d472.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2026-04-01 at 18:07 -0500, Andrew Jackson wrote: > Attached is an updated patch. Thank you, it applies and passes the regression tests. >=20 > > Good, but you should append something to the "errorMessage", like > > conninfo_add_defaults() does elsewhere. >=20 > Added an error append in this patch. It has the impact of printing 2 > lines of errors on failure though: one from the newly appended message > and one from ldapServiceLookup. Not sure if there are other examples > of this behavior in libpq. Will look into this more tommorow. Oh, I didn't look at that. If ldapServiceLookup() already appends a meaningful error message, there is no need to add another one. >=20 >=20 The documentation is better now. > --- a/src/interfaces/libpq/fe-connect.c > +++ b/src/interfaces/libpq/fe-connect.c > #ifdef USE_LDAP > - if (strncmp(line, "ldap", 4) =3D=3D 0) > + /* > + * Is this a potential ldapurl or a ldapserviceurl parame= ter? > + */ > + if (strncmp(line, "ldap:", 5) =3D=3D 0) > { > int rc =3D ldapServiceLookup(line, options, e= rrorMessage); That change does not really belong to the patch, but is alright by me. I'll mark the patch as "ready for committer". Yours, Laurenz Albe