Re: PostgreSQL URI

2021-02-27 Thread Paul Förster
Hi Tom, > On 26. Feb, 2021, at 21:29, Tom Lane wrote: > > Actually we need a patch against the SGML sources, not the generated > files. I didn't know this, sorry. I'm not a developer. :-) > I took this and marked it up into SGML, and (as usual when > looking at this text, it seems) failed to

Re: PostgreSQL URI

2021-02-26 Thread Tom Lane
=?utf-8?Q?Paul_F=C3=B6rster?= writes: > sorry, I just realized I used a redundant @ character. So here's the > corrected version. Actually we need a patch against the SGML sources, not the generated files. I took this and marked it up into SGML, and (as usual when looking at this text, it seems

Re: PostgreSQL URI

2021-02-26 Thread Paul Förster
Hi Tom, > On 26. Feb, 2021, at 19:02, Paul Förster wrote: > > as I said, I don't know how to write a patch. But I played around with diff & > patch. > > However, does this do when applied to > https://www.postgresql.org/docs/current/libpq-connect.html? Would this be > what is needed? sorry,

Re: PostgreSQL URI

2021-02-26 Thread Paul Förster
Hi Tom, > On 26. Feb, 2021, at 17:13, Tom Lane wrote: > > WFM. Who's going to write the patch? (I can, but if one of you > wants to, be my guest.) as I said, I don't know how to write a patch. But I played around with diff & patch. However, does this do when applied to https://www.postgres

Re: PostgreSQL URI

2021-02-26 Thread Paul Förster
Hi Tom, > On 26. Feb, 2021, at 17:13, Tom Lane wrote: > > WFM. Who's going to write the patch? (I can, but if one of you > wants to, be my guest.) I don't know how to write a patch. Is there any documentation about that? Cheers, Paul

Re: PostgreSQL URI

2021-02-26 Thread Tom Lane
Alvaro Herrera writes: > On 2021-Feb-26, Paul Förster wrote: >> 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

Re: PostgreSQL URI

2021-02-26 Thread Alvaro Herrera
On 2021-Feb-26, Paul Förster wrote: > Hi Tom, > > > On 26. Feb, 2021, at 15:51, Tom Lane 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

Re: PostgreSQL URI

2021-02-26 Thread Paul Förster
Hi Tom, > On 26. Feb, 2021, at 15:51, Tom Lane 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-

Re: PostgreSQL URI

2021-02-26 Thread Tom Lane
Alvaro Herrera 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@][hostspec][/dbname][?paramspec] > where > userspec

Re: PostgreSQL URI

2021-02-26 Thread Paul Förster
Hi Alvaro, > On 26. Feb, 2021, at 15:30, Alvaro Herrera wrote: > > 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

Re: PostgreSQL URI

2021-02-26 Thread Alvaro Herrera
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 shou

Re: PostgreSQL URI

2021-02-25 Thread Paul Förster
Hi Tom, > On 25. Feb, 2021, at 16:43, Tom Lane wrote: > > 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 >connect

Re: PostgreSQL URI

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

Re: PostgreSQL URI

2021-02-25 Thread Paul Förster
Hi Tom, > On 25. Feb, 2021, at 16:22, Tom Lane 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. Cheers, Paul

Re: PostgreSQL URI

2021-02-25 Thread Tom Lane
=?utf-8?Q?Paul_F=C3=B6rster?= writes: > I suspected this already. Still the position of the closing angle bracket > behind the "host" part in the syntax is IMHO wrong in the doc. Hmm. Maybe postgresql://[user[:password]@][host[:port][,...]][/dbname][?param1=value1&...] ? Seems like that woul

Re: PostgreSQL URI

2021-02-25 Thread Paul Förster
Hi Tom, > On 25. Feb, 2021, at 16:09, Tom Lane wrote: > > =?utf-8?Q?Paul_F=C3=B6rster?= writes: >> in >> https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING >> it says that the syntax for a PostgreSQL URI is: > >> postgre

Re: PostgreSQL URI

2021-02-25 Thread Tom Lane
=?utf-8?Q?Paul_F=C3=B6rster?= writes: > in > https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING > it says that the syntax for a PostgreSQL URI is: > postgresql://[user[:password]@][host][:port][,...][/dbname][?param1=value1&...] > What I don&

PostgreSQL URI

2021-02-25 Thread Paul Förster
Hi, in https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING it says that the syntax for a PostgreSQL URI is: postgresql://[user[:password]@][host][:port][,...][/dbname][?param1=value1&...] What I don't understand is the [,...] part, i.e. optionally repeating arg