Re: [PATCH] Add support for postgres:// URIs to PGDATABASE environment variable

Поиск
Список
Период
Сортировка
От Rémi Lapeyre
Тема Re: [PATCH] Add support for postgres:// URIs to PGDATABASE environment variable
Дата
Msg-id E00DFD4D-20ED-4ECC-B5A0-A24F8EF637FC@lenstra.fr
обсуждение исходный текст
Ответ на Re: [PATCH] Add support for postgres:// URIs to PGDATABASE environment variable  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

> Le 17 avr. 2023 à 03:25, Tom Lane <tgl@sss.pgh.pa.us> a écrit :
> 
> You can do this:
> 
> $ psql -d "postgres://localhost/test"
> 
> but that's not the same thing as reinterpreting the dbname field
> of what we have already determined to be a connection string.
> 

Yes, I know see the difference, I got confused by the way the code reuses the dbname keyword to pass the connection
stringand the fact that 
 

$ psql --dbname "postgres://localhost/test"

works, but the dbname parameter of psql is not the same as the dbname used by libpq.


> Perhaps there is a case for inventing a new environment variable
> that can do what you're suggesting.  But you would have to make
> a case that it's worth doing, and also define how it interacts
> with all the other PGxxx environment variables.

I think it could be convenient to have such an environment variable but given your feedback I will just make it
specificto my application rather than a part of libpq.
 

Best,
Rémi

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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: eclg -C ORACLE breaks data
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Add two missing tests in 035_standby_logical_decoding.pl