Re: connect using env. variables

2021-03-09 Thread Daniele Varrazzo
On Tue, 9 Mar 2021 at 12:53, Hans Ginzel wrote: > > Thank you. > > Is there a reason why connect() must get the empty string as parametr, please? No, and I'm happy to make the dsn string optional, as you requested in github. psycopg3 already works this way and you can use connect(). I just wanted

Re: connect using env. variables

2021-03-09 Thread Hans Ginzel
Thank you. Is there a reason why connect() must get the empty string as parametr, please? On Tue, Mar 09, 2021 at 12:44:27PM +0100, Daniele Varrazzo wrote: It does: connect("", **parse_dsn()) -- Daniele

Re: connect using env. variables

2021-03-09 Thread Daniele Varrazzo
On Tue, 9 Mar 2021, 12:06 Hans Ginzel, wrote: > Empty string does not work for **parse_dsn(), see example below. > It does: connect("", **parse_dsn()) -- Daniele

Re: connect using env. variables

2021-03-09 Thread Hans Ginzel
Empty string does not work for **parse_dsn(), see example below. H. On Tue, Mar 09, 2021 at 11:47:42AM +0100, Sebastiaan Mannem wrote: How about emptystring (e.a. '')? Power to Postgres™! Sebastiaan Mannem Product Manager M: +31 6 8252 1560 edbpostgres.com EDB, Anthony Fokkerweg 1, 1059

Re: connect using env. variables

2021-03-09 Thread Sebastiaan Mannem
How about emptystring (e.a. '')? Power to Postgres™! Sebastiaan Mannem Product Manager M: +31 6 8252 1560 edbpostgres.com EDB, Anthony Fokkerweg 1, 1059 CM Amsterdam, The Netherlands On Tue, Mar 9, 2021 at 11:45 AM Hans Ginzel wrote: > Please, there should be a possibility to call conne

connect using env. variables

2021-03-09 Thread Hans Ginzel
Please, there should be a possibility to call connect() without parameters for connecting using environment variables (PGSERVICE, PGDATABASE,…) or defaults ($USER@localhost/postgres). Even pg uri postgres:// is valid, https://www.postgresql.org/docs/current/libpq-connect.html. d = psycopg2.conn