[GENERAL] Feature proposal, DBURL: psql pgsql://joe:p4zzw0rd@example.org:2345/dbname - Mailing list pgsql-general

From Hans Schou
Subject [GENERAL] Feature proposal, DBURL: psql pgsql://joe:p4zzw0rd@example.org:2345/dbname
Date
Msg-id CAApBw34VHuW3KjKMfRqFqJ9r8N8+vOte2kphXmxpKiFTS+oC4g@mail.gmail.com
Whole thread Raw
Responses Re: [GENERAL] Feature proposal, DBURL: psqlpgsql://joe:p4zzw0rd@example.org:2345/dbname  (Christoph Moench-Tegeder <cmt@burggraben.net>)
Re: [GENERAL] Feature proposal, DBURL: psqlpgsql://joe:p4zzw0rd@example.org:2345/dbname  (Albe Laurenz <laurenz.albe@wien.gv.at>)
[GENERAL] Re: Feature proposal, DBURL: psqlpgsql://joe:p4zzw0rd@example.org:2345/dbname  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-general
Hi

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[,column...]*]]]|sql]]]

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

Where
  Scheme: pgsql
  Username: joe
  Password: p4zzw0rd
  Host: example.org
  Port: 2345
  Database: dbname

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

best regards
Hans
Attachment

pgsql-general by date:

Previous
From: PAWAN SHARMA
Date:
Subject: Re: [SPAM] [GENERAL] How to install pgadmin3 or pgadmin4 on linux machine
Next
From: Devrim Gündüz
Date:
Subject: Re: [GENERAL] [ADMIN] How to install pgadmin3 or pgadmin4 on linux machine