From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix an oversight in commit 4c70098ff.
Date: Thu, 23 Jan 2020 21:15:59 +0000
Message-ID: <E1iujpX-0006hc-Pw@gemulon.postgresql.org> (raw)
Fix an oversight in commit 4c70098ff.
I had supposed that the from_char_seq_search() call sites were
all passing the constant arrays you'd expect them to pass ...
but on looking closer, the one for DY format was passing the
days[] array not days_short[]. This accidentally worked because
the day abbreviations in English are all the same as the first
three letters of the full day names. However, once we took out
the "maximum comparison length" logic, it stopped working.
As penance for that oversight, add regression test cases covering
this, as well as every other switch case in DCH_from_char() that
was not reached according to the code coverage report.
Also, fold the DCH_RM and DCH_rm cases into one --- now that
seq_search is case independent, there's no need to pass different
comparison arrays for those cases.
Back-patch, as the previous commit was.
Branch
------
REL9_5_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/0e63d9641bad3f50f91ee8e351051bddabac8d31
Modified Files
--------------
src/backend/utils/adt/formatting.c | 6 +---
src/test/regress/expected/horology.out | 63 ++++++++++++++++++++++++++++++++++
src/test/regress/sql/horology.sql | 19 ++++++++++
3 files changed, 83 insertions(+), 5 deletions(-)
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: Fix an oversight in commit 4c70098ff.
In-Reply-To: <E1iujpX-0006hc-Pw@gemulon.postgresql.org>
References: <E1iujpX-0006hc-Pw@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