Re: libpq: Fix wrong connection status on invalid "connect_timeout"

From: Lars Kanis <lars(at)greiz-reinsdorf(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: libpq: Fix wrong connection status on invalid "connect_timeout"
Date: 2019-10-18 12:01:23
Message-ID: 91445b6f-85c9-acaa-a268-d7d6bfd43d87@greiz-reinsdorf.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Am 18.10.19 um 05:06 schrieb Michael Paquier:

> So attached is a patch to skip trailing whitespaces as well,
> which also fixes the issue with ECPG. I have refactored the parsing
> logic a bit while on it. The comment at the top of parse_int_param()
> needs to be reworked a bit more.

I tested this and it looks good to me. Maybe you could omit some
redundant 'end' checks, as in the attached patch. Or was your intention
to verify non-NULL 'end'?

> Perhaps we could add directly regression
> tests for libpq. I'll start a new thread about that once we are done
> here, the topic is larger.

We have around 650 tests on ruby-pg to ensure everything runs as
expected and I always wondered how the API of libpq is being verified.

--
Kind Regards,
Lars Kanis

Attachment Content-Type Size
libpq-parse-fix-v2.patch text/x-patch 1.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2019-10-18 12:01:58 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Previous Message Corey Huinker 2019-10-18 11:54:18 Add Change Badges to documentation