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.94.2) (envelope-from ) id 1uWrho-002Vvs-6p for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Jul 2025 07:16:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uWrhm-00BY0A-8R for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Jul 2025 07:16:30 +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.94.2) (envelope-from ) id 1uWrhl-00BY00-Us for pgsql-hackers@lists.postgresql.org; Wed, 02 Jul 2025 07:16:30 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uWrhj-0056NI-0i for pgsql-hackers@lists.postgresql.org; Wed, 02 Jul 2025 07:16:29 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 11DBC36D896 for ; Wed, 02 Jul 2025 09:16:24 +0200 (CEST) Received: from s934.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 03A1236DA93; Wed, 02 Jul 2025 09:16:24 +0200 (CEST) Received: from s474.loopia.se (unknown [172.22.191.6]) by s934.loopia.se (Postfix) with ESMTP id 0112A7CEA5D; Wed, 02 Jul 2025 09:16:24 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s474.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=yesql.se Received: from s934.loopia.se ([172.22.191.5]) by s474.loopia.se (s474.loopia.se [172.22.190.14]) (amavisd-new, port 10024) with LMTP id 6k8PEt9_Ewwo; Wed, 2 Jul 2025 09:16:23 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.236 Received: from smtpclient.apple (customer-89-255-232-236.stosn.net [89.255.232.236]) (Authenticated sender: daniel@yesql.se) by s934.loopia.se (Postfix) with ESMTPSA id 5F2767CEA59; Wed, 02 Jul 2025 09:16:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1751440583; bh=dPNr8b+XIeOvkphheiaDjqkb6yRKwQA/V3L4xeGH1Og=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=KQrxCtzp5k2u8OY7+ldRyto/hhO46mg/nHgTf+x9kWp71+9grtCDM9dk7LGhX9rzJ MOPSgHPyd+Yj6QTrXtnkjBMtl2pMfkTRXdXlmneQ+UtPmW7wgdXWOhAylMyXklm3Iv r3Nb7BVvCxj1BXGZb6Fv879GhWzuZJxfb6K4sBnw/xJHARB9cFZCpVDUQ2v9TT8dIc yBAwntVN35oxJ2Bqn2HsdY57jJRDUrewn+CkzZlNQka7mZV18E9TkUOLrkNd97JqBJ bktiLhnNF40aCi6Nm2SmtLNPQ7XE7EaEwn/Bp34lRFIG8RZBq/4YSfKQLDoBNMs7EL 2Dlpb/RxhGxpA== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.2\)) Subject: Re: [PATCH] initdb: Treat empty -U argument as unset username From: Daniel Gustafsson In-Reply-To: Date: Wed, 2 Jul 2025 09:16:12 +0200 Cc: "David G. Johnston" , Jianghua Yang , pgsql-hackers@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <0231C713-50C8-4BE5-B7C8-106F57A79655@yesql.se> References: To: Robert Treat X-Mailer: Apple Mail (2.3776.700.51.11.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 2 Jul 2025, at 06:31, Robert Treat wrote: > FWIW, I tend to agree with David; I feel like if a user passes in -U, > there was probably a reason, and a good error message would be more > useful in clarifying things rather than blindly pushing forward with > potentially the wrong thing. Agreed, and it's not even clear that the previous code was intentionally = trying to allow an empty -U. An improved error message would be a good patch = though. -- Daniel Gustafsson