=?utf-8?Q?Paul_F=C3=B6rster?= <[email protected]> writes:
>> On 25. Feb, 2021, at 16:22, Tom Lane <[email protected]> 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