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@lists.postgresql.org
Subject: pgsql: Cosmetic improvements for default text search parser's ts_headli
Date: Thu, 09 Apr 2020 17:19:44 +0000
Message-ID: <E1jMaq8-0000bR-T5@gemulon.postgresql.org> (raw)

Cosmetic improvements for default text search parser's ts_headline code.

This code was woefully unreadable and under-commented.  Try to improve
matters by adding comments, using some macros to make complicated
if-tests more readable, using boolean type where appropriate, etc.
There are a couple of tiny coding improvements too, but this commit
includes (I hope) no behavioral change.

Nonetheless, back-patch as far as 9.6, because a followup bug-fixing
commit depends on this.

Discussion: https://postgr.es/m/16345-2e0cf5cddbdcd3b4@postgresql.org

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1306edeae3b362b57b37b41e7b6a14406d03ebad

Modified Files
--------------
src/backend/tsearch/wparser_def.c | 273 ++++++++++++++++++++++++--------------
1 file changed, 176 insertions(+), 97 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1jMaq8-0000bR-T5@gemulon.postgresql.org>
Permalink:  ../E1jMaq8-0000bR-T5@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jMaq8-0000bR-T5@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: Cosmetic improvements for default text search parser's ts_headli
  In-Reply-To: <E1jMaq8-0000bR-T5@gemulon.postgresql.org>
  References: <E1jMaq8-0000bR-T5@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