From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: contrib/sslinfo cleanup and OpenSSL errorhandling |
Date: | 2020-11-02 14:19:55 |
Message-ID: | CABUevEzbnBEzDgS4QFX1eNk8DH5D5X4SbyHvaFhsKABEfoAwPg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 30, 2020 at 11:20 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
> > On 30 Oct 2020, at 00:40, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> > There's quite a few copies of this code that look exactly the same,
> > except for the be_tls_get_* call. Do you see a way to have fewer copies
> > of the same code?
>
> There's really only two of the same, and two sets of those. I tried some
> variations but didn't really achieve anything that would strike the right
> balance on the codegolf-to-readability scale. Maybe others have a richer
> imagination than me.
Yeah, since it's only 2 of each, moving it to a macro wouldn't really
save a lot -- and it would make things less readable overall I think.
So I'd say the current version is OK.
One thing I noted was in the docs part of the patch there is a missing
comma -- but that one is missing previously as well. I'll go apply
that fix to the back branches while waiting to see if somebody comes
up with a more creative way to avoid the repeated code :)
--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-11-02 14:21:16 | Re: Getting rid of aggregate_dummy() |
Previous Message | Andrew Dunstan | 2020-11-02 14:17:00 | Re: Support for NSS as a libpq TLS backend |