pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Minor code review for parse_phrase_operator().
Date: Mon, 26 Jun 2017 14:31:40 +0000
Message-ID: <E1dPV3E-0000qZ-BO@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Minor code review for parse_phrase_operator().

Fix its header comment, which described the old behavior of the <N>
phrase distance operator; we missed updating that in commit 028350f61.
Also, reset errno before strtol() call, to defend against the possibility
that it was already ERANGE at entry.  (The lack of complaints says that
it generally isn't, but this is at least a latent bug.)  Very minor
stylistic improvements as well.

Victor Drobny noted the obsolete comment, I noted the errno issue.
Back-patch to 9.6 where this code was added, just in case the errno
issue is a live bug in some cases.

Discussion: https://postgr.es/m/2b5382fdff9b1f79d5eb2c99c4d2cbe2@postgrespro.ru

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9bfb1f2d64c4cab108a69e4bf66da4c2464dcaaf

Modified Files
--------------
src/backend/utils/adt/tsquery.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (2+ messages)  latest in thread

Message-ID: <E1dPV3E-0000qZ-BO@gemulon.postgresql.org>
Permalink:  ../E1dPV3E-0000qZ-BO@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1dPV3E-0000qZ-BO@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Minor code review for parse_phrase_operator().
  In-Reply-To: <E1dPV3E-0000qZ-BO@gemulon.postgresql.org>
  References: <E1dPV3E-0000qZ-BO@gemulon.postgresql.org>

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

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