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 1x0Xph-004grW-2v for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Aug 2026 05:11:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x0Xpf-00D2Fc-23 for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Aug 2026 05:11:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x0Xpf-00D2FT-16 for pgsql-hackers@lists.postgresql.org; Sun, 30 Aug 2026 05:11:51 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x0Xpd-000000036bD-359V for pgsql-hackers@lists.postgresql.org; Sun, 30 Aug 2026 05:11:50 +0000 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-383b4a3755fso2783076a91.3 for ; Sat, 29 Aug 2026 22:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788066709; x=1788671509; darn=lists.postgresql.org; h=references:to:cc:in-reply-to:date:subject:mime-version:content-type :message-id:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=rtF+e4pY9vA19N4rQIH3j8UmQ/kkn/9N+cmx/eV3jt4=; b=mQ5iaE/TPb0lfJdQpZrF7ozw0Ovhk242k83NO5bc/Pky+Uec2Lsag8lS3AMMQJHui0 Pyioo2foymbjR1hYHN4YqZZXBjiH/uw0Bzfyr1CPCBgzCnilNP/AN++Qa5Z/TIZn7vJD xgBKU/IK0BY3gBoh0MM8wn4u6zTsAzQ870eoPX0+GzAR4R3MZ/aC33tL6JATInvYOYVn fVByRs7FJ2oB6spkWgnDz9Q536F6UYIPSQoFE0AfTL3wxqLh+HpvWPqU848IASWlDoc6 5/2YtDvsUj3SqQQEsNHcmHfYQMErX5WaHEP5Z9nywsYJ6wI65Jm2ofqMUKGk9SYzyOvP YV0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788066709; x=1788671509; h=references:to:cc:in-reply-to:date:subject:mime-version:content-type :message-id:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=rtF+e4pY9vA19N4rQIH3j8UmQ/kkn/9N+cmx/eV3jt4=; b=k4z+eXL+LSil8XbzM2PDQliBvrQlXSUVXucrQfOGQNosC1tdXPAgmcc0zlCHEadmpe gkUFkOds5u/7ovBrlWE/ONMhAyl52cB4/OhU5LOrh7jDz0j5kOnkt33VE2zhFZOCuQAu zteT2QFJVwaZ61RbNqPwctLcFvr54a3aWKoDPHzWfTnVPhqzaeJc4bybGJ4IJJ/hSYvs G5bYOItngCLJih+u0vy5lRyjOzq3hxTlKX9UA45Dw8oMakkJKEX2o11EhefBlOkwGjns CUrMWDCWPVImSljYU9BS9yXJ29Ec3q1hodE21EC5KU7GW2ZVjs+/vkTraCak+WvQ3AU7 dsZw== X-Forwarded-Encrypted: i=1; AKwUvBz3e4sgiJuhcEx+WHwuMpcnDdex/iSYG/oJ1/IVTe9g31gERvKXTikV16612gnkrhAgikXOBIygpjWeI+yx@lists.postgresql.org X-Gm-Message-State: AFuF++njE3Xlqvnj7NMKqCrJMTPdGe97W14WDVAy1WYUlSHp0/g2Qo+Q ONe6Xs+Seduz0twKDxoNjqPx2ztjMbtyDMHtzE3cEGH/yD766aX3mWTw X-Gm-Gg: AYBFou0BpT0fasNrun0b3chbmNE4tckdUXyksRcygg8Cdwmqx23VYABIb62iway8m5F GNsfTLd2CXAI3X6/0PQb/t4lNW6RyUfCTFRfLorFdzw0XaqcpIBBLY1pJMT84LyTl+Nf7GLemdX hsLQA99G6yPY5IjBdCgyp5GiONgXC2oWL/vXEPn0LlSv+XSr5KQjxagw8eUve+BPXMTNKfzhBzH 9HS19phxtfYvnOfotNTR3lgrVtNcSzNhAtEd5YQ76+62qBXOh2NVDB5n6G8H6j55WgOGaHXiiAJ 0vgxi09p//ZbO5JIwUQRYBxT04OeRdrrsr6B7MnfyU80wGnhBoJjMHAPj6bpHMXAsLRxKDOi6o6 A6VF/CDPzP6ZOHynt/qVa2Jgw4iSYmBIArCJ9cQartbt07S3rsqevINH7Obui7yo1c37MlJa+7p YEBt9dk7ExdfJZfITERxP28Gm4kFXxmFOpLeYo2u7rcaQ2LQro1uw7J8/fVNePRWBU9r5bk1QbD 4F3FrFg7WzhF7CuG+k9T++WKxhnXlY0s00E33URRcp13/Xj X-Received: by 2002:a17:90b:590f:b0:398:9be5:b417 with SMTP id 98e67ed59e1d1-3989be5b4bdmr16004352a91.18.1788066708691; Sat, 29 Aug 2026 22:11:48 -0700 (PDT) Received: from smtpclient.apple (mx-ll-171.5.165-154.dynamic.3bb.co.th. [171.5.165.154]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-396ddc0c703sm9740794a91.9.2026.08.29.22.11.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Aug 2026 22:11:48 -0700 (PDT) From: Denis Smirnov Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_7DEA1394-59E0-459E-8E2A-B9D5C4980ECB" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.700.51.1.1\)) Subject: Re: [Proposal] add portaddr like hostaddr Date: Sun, 30 Aug 2026 12:11:34 +0700 In-Reply-To: <92e93ea7-0c09-4fb2-b6ce-4f43cf444ebb@gmail.com> Cc: Jacob Champion , pgsql-hackers@lists.postgresql.org To: Diego References: <70436540-9d77-4014-89af-462881ed18d9@gmail.com> <1e3b609e-4cf7-4c39-8770-8248c8b81399@gmail.com> <63F7ADE6-DF8F-4261-9FEC-89A381E57E6A@gmail.com> <71685CE0-477D-4E4B-ADFE-D3CC3873512C@gmail.com> <636a2d5b-adaf-45d7-a255-870682a8cc73@gmail.com> <92e93ea7-0c09-4fb2-b6ce-4f43cf444ebb@gmail.com> X-Mailer: Apple Mail (2.3864.700.51.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_7DEA1394-59E0-459E-8E2A-B9D5C4980ECB Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Hi Diego, I think a better solution would be to expose the existing passwordFromFile() code through a new public libpq API, perhaps PQpassfileLookup(). Then pgcli could look up the password using the original host and port, and connect to the local tunnel port with that password. This would avoid both a new connection parameter and a separate .pgpass parser in each client. I would be happy to review such a patch. I think this would be a useful addition to PostgreSQL. Best regards, Denis Smirnov --Apple-Mail=_7DEA1394-59E0-459E-8E2A-B9D5C4980ECB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Hi Diego,

I = think a better solution would be to expose the = existing
passwordFromFile() code through a new public libpq = API, perhaps
PQpassfileLookup().

Then = pgcli could look up the password using the original host and = port,
and connect to the local tunnel port with that password. = This would avoid
both a new connection parameter and a = separate .pgpass parser in = each
client.

I would be happy to = review such a patch. I think this would be a useful
addition = to PostgreSQL.


Best regards,
Denis = Smirnov

= --Apple-Mail=_7DEA1394-59E0-459E-8E2A-B9D5C4980ECB--