Re: PostgreSQL URI

From: Paul Förster <paul(dot)foerster(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: PostgreSQL URI
Date: 2021-02-26 14:57:53
Message-ID: B5912C36-E8E6-491C-AC6B-482E4D45EB99@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Tom,

> On 26. Feb, 2021, at 15:51, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> +1. I think you could lose the outer brackets in hostspec in
> this formulation, ie given that hostspec is already bracketed
> above, it should be enough to write
>
> hostspec is [host][:port][,...]
>
> Also, the paramspec is under-bracketed today. Should be
> more like
>
> paramspec is param=value[&...]

if you remove the outer brackets of host spec, then that means that only the port may be repeated. The repeat is always meant to refer to its immediate preceding argument. The outer brackets make sure that it refers to either of both host *and* port.

This is exactly what I was initially confused about. So I consider the outer brackets essential for that.

Cheers,
Paul

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2021-02-26 15:20:35 Re: PostgreSQL URI
Previous Message Tom Lane 2021-02-26 14:51:14 Re: PostgreSQL URI