Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1irwAC-0004sS-Vz for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jan 2020 03:49:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1irwAB-00017O-K4 for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jan 2020 03:49:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1irwAB-00012K-B9 for pgsql-bugs@lists.postgresql.org; Thu, 16 Jan 2020 03:49:43 +0000 Received: from [64.147.123.20] (helo=wout4-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1irwA3-00080S-SE for pgsql-bugs@lists.postgresql.org; Thu, 16 Jan 2020 03:49:42 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 266BB6D6; Wed, 15 Jan 2020 22:49:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 15 Jan 2020 22:49:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=NSoXjMhw7o6Dx8kNAiql5lsyZzC L4LD5hOVaFC34THw=; b=TBYWMSpdb27WmX42qVLS+Ymu8CuoFTKKFhBsEe0xNFz IDKHLJ+xTeqgstzNvVFc9NS6X8mfrVvPjyL9beReZHv4wn5GZzakNcZUJInXAiGg 5Bo1mJqefGR5MNtT1R9fUGbKb+UmHlvSw4Mpc8C+8ECT2j/YI1iFWuBJl7UdeR9F kf33cC3u8HaWRVut/KQk7hQL7XFJA2UliFLIVjTMkv3HDb4yALDtyKGOSIMFJTbP UMGs5uuXEbtBzRk3vT9wLYxf+gU+ETaOQwn9PQDpO5yhiDwbeWtt8UBV5JsGOgkC CcsELc0zxnsI+jsGHIfL3kVTE/lLfUMPjlTotR3107g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=NSoXjM hw7o6Dx8kNAiql5lsyZzCL4LD5hOVaFC34THw=; b=HmTtjP2L4RLU0ytNmys8Bi GL2n0qA7yG45RYjtHzfCmpSB+frKbMFT2c7nHW9laVGD+FHEyzE4Q9UHXRHp6cej WJnp9FnyOErG/a6TqX2je7SYiwt0s08DroTvdTCiSCVTbLUbRh+3EEVgxpQf49og KYDqG9BefSTzplTvIJs4z46fWzKfwaxz4dmhOZ5w3nR4T4S5aKZzvL6SMvqwOIpd YYatxGOCgqEk57GCRmTEJef7gWYEvxkMlKufOIIY3+YjTQOvhcKZRwSh2emHije4 OsYG/ZvNV9Nxb9Px2noAiTYFVh4rJApAZDoybiCBnlrqCsAnyabj/xWmXsD6sZig == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrtdeggdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdefhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuffhomhgrihhnpeifihhkihhpvgguihgrrdhorhhgpdhivght fhdrohhrghenucfkphepudduuddruddtvddrudektddrudekheenucfrrghrrghmpehmrg hilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlhhushhtvghr ufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 89BA380061; Wed, 15 Jan 2020 22:49:20 -0500 (EST) Date: Thu, 16 Jan 2020 12:49:17 +0900 From: Michael Paquier To: Peter Eisentraut Cc: Jobin Augustine , Heikki Linnakangas , Oleksandr Shulgin , pgsql-bugs@lists.postgresql.org Subject: Re: libpq parameter parsing problem Message-ID: <20200116034917.GD3117@paquier.xyz> References: <22b4a79a-5d60-cec0-474e-4a68c8be2b7a@iki.fi> <20200109043809.GK2251@paquier.xyz> <20200114060317.GF1515@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yH1ZJFh+qWm+VodA" Content-Disposition: inline In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.20 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --yH1ZJFh+qWm+VodA Content-Type: multipart/mixed; boundary="vv4Sf/kQfcwinyKX" Content-Disposition: inline --vv4Sf/kQfcwinyKX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jan 15, 2020 at 04:42:28PM +0100, Peter Eisentraut wrote: > Let's please not put links to Wikipedia into the main body of the > documentation. If people want to look up something, they know where to find > it. That's not really a new concept: $ cd doc/ && git grep wikipedia\.org | wc -l 55 > Links to authoritative sources (perhaps an RFC in this case) would be > better. No objections to your suggestion in this case though. I can see Section 2.1 from RFC3986 for that: https://tools.ietf.org/html/rfc3986#section-2.1 So, gathering all the feedback and my own tweaks, I finish with the attached (merely simplified). -- Michael --vv4Sf/kQfcwinyKX Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="libpqURIconnection_v3.diff" Content-Transfer-Encoding: quoted-printable diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 64cff49c4d..348cb0e866 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -925,10 +925,15 @@ postgresql:///mydb?host=3Dlocalhost&port=3D5433 =20 - Percent-encoding may be used to include symbols with special meaning i= n any - of the URI parts, e.g. replace =3D with - %3D. - + Connection URI needs to be encoded with=20 + Percent= -encoding=20 + if it includes symbols with special meaning in any of its parts.=20 + Here is an example where =3D is replaced with + %3D and whitespace character with + %20: + +postgresql://user@localhost:5433/mydb?options=3D-c%20synchronous_commit%3D= off + =20 --vv4Sf/kQfcwinyKX-- --yH1ZJFh+qWm+VodA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4f3T0ACgkQnvQgOdby QH0aQg//bzNpGoDRWs2WvS6e71aTQjXyaWIUux99jd9ow4Tl0IOoVoorqImL6hbr vSjLyMADm4A07p04OB0foHIppxF5028sxchVFG8m6mTyAxr9ITEyDwPi4OEtmv6k C4SG6ontXlYW0GArQjIv/R6wmqbJKjTcPQpCnztaChyCgOCt8sLepU5RAsUVB+HW pYrdHin9aiqHP6h2o+aZSCsMgeaMvw4Ip96mpV3RLNimLXojtmhXokmFu373fHCI 5uilQompuMjqB/B9Vb2m9ZRUySinElL14PVTgoUu1NSxk4rZZ7TZRZanpO1W6IRf gQXLKMl5FbrEeBKHpenxvm4wcBZfwKsZV2+I10fdNxs4CVcPoMpHVp+1Rag60W+X NqQzlhmTGKaG/Eiokn7pnpptNEIkxzarFl5TnN8pSs9lYbNPScXIm8XYQbGSARa+ uCx+RaEu1Ojx8JM7P0+hRHBiGYMJKicETzPyc4CnHL/P9ByYVK97Px5jKL6LQVGq hIU33k16p3zvJIS/casiKx+YQ0q1bvmgnPXEWT3y3nZ6L28n3pB4bjRkYxuV1xA3 9CyYYXiCpwc7Ft4K8NmczHaTWzQVLF8kchrHXVXf545l5UKrDyABhYW6QexZ27QT 9R34DqjICLA75eGN0o6n9Ai1drOM0SWCGmyi5aYpqhNChgIhokE= =ISTG -----END PGP SIGNATURE----- --yH1ZJFh+qWm+VodA--