Re: [GENERAL] Feature proposal, DBURL: psqlpgsql://joe:p4zzw0rd@example.org:2345/dbname

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: [GENERAL] Feature proposal, DBURL: psqlpgsql://joe:p4zzw0rd@example.org:2345/dbname
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B53A703AA@ntex2010a.host.magwien.gv.at
обсуждение исходный текст
Ответ на [GENERAL] Feature proposal, DBURL: psql pgsql://joe:p4zzw0rd@example.org:2345/dbname  (Hans Schou <hans.schou@gmail.com>)
Ответы Re: [GENERAL] Feature proposal, DBURL: psqlpgsql://joe:p4zzw0rd@example.org:2345/dbname
Re: [GENERAL] Feature proposal, DBURL: psql pgsql://joe:p4zzw0rd@example.org:2345/dbname
Список pgsql-general
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:p4zzw0rd@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:

https://www.postgresql.org/docs/current/static/libpq-connect.html#AEN45571
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=b035cb9db7aa7c0f28581b23feb10d3c559701f6

Yours,
Laurenz Albe

В списке pgsql-general по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [GENERAL] pg_start/stop_backup non-exclusive scripts to snapshot
Следующее
От: Tom van Tilburg
Дата:
Сообщение: [GENERAL] building extension with large string inserts