From: Tom Lane <tgl@sss.pgh.pa.us>
To: Paul Förster <paul.foerster@gmail.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: PostgreSQL URI
Date: Thu, 25 Feb 2021 10:43:03 -0500
Message-ID: <128981.1614267783@sss.pgh.pa.us> (raw)
In-Reply-To: <0B622B94-DF71-40A6-974B-0262D8C6E2EE@gmail.com>
References: <6E752D6B-487C-463E-B6E2-C32E7FB007EA@gmail.com>
<109141.1614265768@sss.pgh.pa.us>
<F69C8770-2CBD-4F6C-8A84-26300932572A@gmail.com>
<119975.1614266568@sss.pgh.pa.us>
<0B622B94-DF71-40A6-974B-0262D8C6E2EE@gmail.com>
=?utf-8?Q?Paul_F=C3=B6rster?= <paul.foerster@gmail.com> writes:
>> On 25. Feb, 2021, at 16:22, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Hmm. Maybe
>> postgresql://[user[:password]@][host[:port][,...]][/dbname][?param1=value1&...]
>> ? Seems like that would clarify how much you can repeat.
> yes, that looks better, thanks.
Experimenting, it does let you omit the host and specify a port:
$ psql -d postgresql://:5433
psql: error: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5433"?
So the original syntax diagram is not wrong. We could add brackets
to clarify the repeatable part:
postgresql://[user[:password]@][[host][:port][,...]][/dbname][?param1=value1&...]
but I'm less sure that that's an improvement.
regards, tom lane
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: tgl@sss.pgh.pa.us, paul.foerster@gmail.com
Subject: Re: PostgreSQL URI
In-Reply-To: <128981.1614267783@sss.pgh.pa.us>
References: <6E752D6B-487C-463E-B6E2-C32E7FB007EA@gmail.com> <109141.1614265768@sss.pgh.pa.us> <F69C8770-2CBD-4F6C-8A84-26300932572A@gmail.com> <119975.1614266568@sss.pgh.pa.us> <0B622B94-DF71-40A6-974B-0262D8C6E2EE@gmail.com> <128981.1614267783@sss.pgh.pa.us>
* 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