public inbox for [email protected]  
help / color / mirror / Atom feed
From: Daniele Varrazzo <[email protected]>
To: Hans Ginzel <[email protected]>
Cc: Sebastiaan Mannem <[email protected]>
Cc: [email protected]
Subject: Re: connect using env. variables
Date: Tue, 9 Mar 2021 15:02:03 +0100
Message-ID: <CA+mi_8aEuy8bgegNVw40uaBg0skoQx=Fuiby+Strx09B2sO6ew@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<CAASsAGZCq2UOU_wmqO99kku5T3KwTOATi7NzdN_Zgk6mR-CWpA@mail.gmail.com>
	<[email protected]>
	<CA+mi_8auuDxMLLFS3WpYw-7jMzu8KM69WpaJbGGw=66aPLcsqw@mail.gmail.com>
	<[email protected]>

On Tue, 9 Mar 2021 at 12:53, Hans Ginzel <[email protected]> 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 to point out that you can do what you want to do already:
connecting using only the PG* env var or the parse_dsn() produce.

It's one of these things that is ugly but has been that way for so
long that we are used to it. Or better, which should have been fixed
when we introduced the possibility to pass both the dsn string and the
keywords to connect(), because in the past there was no parse_dsn()
and facility to merge the two.

Cheers

-- Daniele





view thread (6+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: connect using env. variables
  In-Reply-To: <CA+mi_8aEuy8bgegNVw40uaBg0skoQx=Fuiby+Strx09B2sO6ew@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox