On 07/05/2017 06:15 AM, Albe Laurenz wrote:
Hans Schou wrote:
The dburl (or dburi) has become common to use by many systems connecting to a 
database.
The feature is that one can pass all parameters in a string, which has similar 
pattern as
http-URI do.

Especially when using psql in a script, having the credentials in one string is
convenient.


The syntax could be:

[scheme[<+>dsn]]://[[username[:[password]]@][host][:port][/[dbname][/[[table[/[column[,col
umn...]*]]]|sql]]]


Example of usage:
   psql pgsql://joe:p4zzw...@example.org:2345/dbname

[...]

I have attached an example of how it could be implemented. It uses libpcre 
RegEx to pass
the dburl.

Unless I misunderstand, this has been in PostgreSQL since 9.2:

T think the OP was referring to the latter part of:

[scheme[<+>dsn]]://[[username[:[password]]@][host][:port][/[dbname][/[[table[/[column[,column...]*]]]|sql]]]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The thing is that in a quick search on this I did not find a reference implementation of this to compare against.


Yours,
Laurenz Albe



--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to