From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Paul Förster <paul.foerster@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: PostgreSQL URI
Date: Fri, 26 Feb 2021 11:30:50 -0300
Message-ID: <20210226143050.GA875@alvherre.pgsql> (raw)
In-Reply-To: <3F116E4C-9ED4-4F52-9E17-C58DE81B6707@gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: alvherre@alvh.no-ip.org, paul.foerster@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: PostgreSQL URI
In-Reply-To: <20210226143050.GA875@alvherre.pgsql>
References: <3F116E4C-9ED4-4F52-9E17-C58DE81B6707@gmail.com> <20210226143050.GA875@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox