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

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: [GENERAL] Feature proposal, DBURL: psqlpgsql://joe:p4zzw0rd@example.org:2345/dbname
Дата
Msg-id 0c95a5bd-57cd-f566-f858-478853f2422e@aklaver.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Feature proposal, DBURL: psqlpgsql://joe:p4zzw0rd@example.org:2345/dbname  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Ответы Re: [GENERAL] Feature proposal, DBURL: psql pgsql://joe:p4zzw0rd@example.org:2345/dbname
Список pgsql-general
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: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:

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.klaver@aklaver.com


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

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