Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lFe8z-00014i-Rq for pgsql-general@arkaria.postgresql.org; Fri, 26 Feb 2021 14:31:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lFe8y-0001dm-3D for pgsql-general@arkaria.postgresql.org; Fri, 26 Feb 2021 14:31:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lFe8x-0001df-2q for pgsql-general@lists.postgresql.org; Fri, 26 Feb 2021 14:30:59 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lFe8u-0004Rh-HQ for pgsql-general@lists.postgresql.org; Fri, 26 Feb 2021 14:30:57 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3EFBB5C016D; Fri, 26 Feb 2021 09:30:54 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 26 Feb 2021 09:30:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=YKWD5sMySuiLjxu4ks2kTqBOlCpIAz/NXuX4GL5x8wM=; b=XxRs5lxu m/6i6NQLb08Q3F+wLZXJbIKz00w7V1ENZ68A51tbWkjlmiXaN6m0sbPTkFnI2ron Bpe3gH51vSbwmvzDqeQCGh/itSQZKNpQpH4Thb/Ejq3zpgW5lKb5o+i3UUtiCkKz 1YpTz1Q1L1SenjzV2eFoHBiQNK/9BBIEDDsXVZ+E7s0cfbmdG+woJ5vXjpMKGSiP QwyJKbUxAzmwE3sWflaqL3P0QM50j8GGp2GnwJXB/Df77doJWydSaCBpOsSCQ/Y9 p7afHrqRrM3zuUtXHpWJvzh/3cyhsgSihT0iLTrHF8bwI0SzIo4pYWlfctZ6rcT7 jmnbB0AayphQJg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrledugdeijecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgjggfsehtkeertddtredunecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpeeufffhjeeiueeuffegvddukeegledtveeivdeiueefieei vefgteehueefteehvdenucfkphepudeltddrleehrdduledrleehnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhv hhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA id 8BBBF24005E; Fri, 26 Feb 2021 09:30:53 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 670662A0FB1; Fri, 26 Feb 2021 11:30:50 -0300 (-03) Date: Fri, 26 Feb 2021 11:30:50 -0300 From: Alvaro Herrera To: Paul =?iso-8859-1?Q?F=F6rster?= Cc: Tom Lane , pgsql-general list Subject: Re: PostgreSQL URI Message-ID: <20210226143050.GA875@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3F116E4C-9ED4-4F52-9E17-C58DE81B6707@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2021-Feb-25, Paul Förster wrote: > So, my suggestion is: > > postgresql://[user[:password]@][[host][:port]][,...][/dbname][?param1=value1&...] > > Still, I think that it's an improvement, because it makes clear that not only the port, but also the host may be repeated. I wonder if we shouldn't instead try to break it up in parts that can be explained or described separately. This many brackets makes it pretty hard to read. We could say something like postgresql://[userspec@][hostspec][/dbname][?paramspec] where userspec is user[:password] hostspec is [[host][:port]][,...] paramspec is param1=value1&... which makes it easier to focus on each part separately, and we can provide more verbose explanations or examples where needed. (Now that I broke it up, the original line became very clear to me, but when I saw it in isolation it was not. You need to count brackets carefully to be able to read it.) -- Álvaro Herrera Valdivia, Chile