Re: PostgreSQL URI

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

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> 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(at)][hostspec][/dbname][?paramspec]

> where
> userspec is user[:password]
> hostspec is [[host][:port]][,...]
> paramspec is param1=value1&...

+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[&...]

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Förster 2021-02-26 14:57:53 Re: PostgreSQL URI
Previous Message Paul Förster 2021-02-26 14:47:37 Re: PostgreSQL URI