Re: Need to run pg_dump from the laptop without entering the password

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-10-23 01:55 +0200, Ron wrote:
> On 10/22/23 18:19, Erik Wienhold wrote:
> [snip]
> > The hostname in pgpass.conf is
> > case-sensitive (not mentioned in the docs), so it must match the exact
> > spelling as in the connection parameters.
> 
> That annoys me to. no. end.  Hostnames being lowercase here, uppercase
> there, and mixed case somewhere else and all working just fine *except*
> .pgpass regularly bites me when scripting.

I know.  Found a thread [1] of yours when searching for a reference
because I was sure that I read about that behavior somewhere.  But
apparently it's undocumented.  Here's a patch that adds a note.

[1] https://www.postgresql.org/message-id/a5b3740b-a665-7afe-052b-4382d6daf733%40gmail.com

-- 
Erik
>From 556603b630a547f333afb91edfef78a0fe2c5a2c Mon Sep 17 00:00:00 2001
From: Erik Wienhold <ewie@xxxxxxxxx>
Date: Mon, 23 Oct 2023 02:43:25 +0200
Subject: [PATCH v1] doc: Add note on case-sensitive matching in password file

Add this missing details which causes confusion again and again.
Especially for host names which are not case-sensitive when resolved
with DNS.
---
 doc/src/sgml/libpq.sgml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index a52baa27d5..fee2bde8ff 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -8554,6 +8554,13 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
    the same password for all databases in the same cluster.
   </para>
 
+  <note>
+   <para>
+    The host name, database name, and user name are matched case-sensitively
+    to the respective connection parameters.
+   </para>
+  </note>
+
   <para>
    On Unix systems, the permissions on a password file must
    disallow any access to world or group; achieve this by a command such as
-- 
2.42.0


[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux