Search Postgresql Archives

Re: PostgreSQL URI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux