> Le 17 avr. 2023 à 03:25, Tom Lane <t...@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 string and 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 specific to my application rather than a part 
of libpq.

Best,
Rémi

Reply via email to