From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: libpq stricter integer parsing |
Date: | 2018-09-11 14:47:03 |
Message-ID: | 32c5acc4-94ad-eeb4-5295-d52f25896079@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11/09/2018 11:00, Michael Paquier wrote:
> diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
> index 5e7931ba90..bc7836d103 100644
> --- a/doc/src/sgml/libpq.sgml
> +++ b/doc/src/sgml/libpq.sgml
> @@ -1591,6 +1591,15 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
> </varlistentry>
> </variablelist>
> </para>
> +
> + <para>
> + Integer values expected for keywords <literal>port</literal>,
> + <literal>connect_timeout</literal>, <literal>keepalives_idle</literal>,
> + <literal>keepalives_interval</literal> and
> + <literal>keepalives_timeout</literal> are parsed more strictly as
> + of <product>PostgreSQL<product> 12, i.e. values including trailing garbage
> + or overflowing are rejected.
> + </para>
> </sect2>
> </sect1>
I would leave this out. We don't need to document every single
refinement of parsing rules. This might better belong in the release notes.
> + appendPQExpBuffer(&conn->errorMessage,
> + libpq_gettext("invalid value for keyword \"%s\"\n"),
> + context);
Add the actual invalid value to the error message.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2018-09-11 14:47:21 | Re: CREATE ROUTINE MAPPING |
Previous Message | Tom Lane | 2018-09-11 14:25:35 | Re: StandbyAcquireAccessExclusiveLock doesn't necessarily |