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

2023-04-17 Thread Rémi Lapeyre
> Le 17 avr. 2023 à 03:25, Tom Lane 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

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

2023-04-16 Thread Tom Lane
=?UTF-8?q?R=C3=A9mi=20Lapeyre?= writes: > The PGDATABASE is documented as behaving the same as the dbname connection > parameter but they differ in the support for postgres:// URIs: the > PGDATABASE will never be expanded even thought expand_dbname is set: I think you have misunderstood the docum

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

2023-04-16 Thread Rémi Lapeyre
The PGDATABASE is documented as behaving the same as the dbname connection parameter but they differ in the support for postgres:// URIs: the PGDATABASE will never be expanded even thought expand_dbname is set: $ psql postgres://localhost/test -c 'select 1' >/dev/null # Works $ PG