pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix an oversight in commit 4c70098ff.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix an oversight in commit 4c70098ff.
@ 2020-01-23 21:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-23 21:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

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

Modified Files
--------------
src/backend/utils/adt/formatting.c     |  9 +----
src/test/regress/expected/horology.out | 63 ++++++++++++++++++++++++++++++++++
src/test/regress/sql/horology.sql      | 19 ++++++++++
3 files changed, 83 insertions(+), 8 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix an oversight in commit 4c70098ff.
@ 2020-01-23 21:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-23 21:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f309c812ed3106def62e940ca54718c7eeda8694

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(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix an oversight in commit 4c70098ff.
@ 2020-01-23 21:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-23 21:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7a9fef2990174cc8315eb20372afb1557e5cb01a

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(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix an oversight in commit 4c70098ff.
@ 2020-01-23 21:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-23 21:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d6a9548b2fdc402bf818cab3d7a621fb5c3ced58

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(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix an oversight in commit 4c70098ff.
@ 2020-01-23 21:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-23 21:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/451f50813b6f2ddda81c1f7d42976dd7ca506bd0

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(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix an oversight in commit 4c70098ff.
@ 2020-01-23 21:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-23 21:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix an oversight in commit 4c70098ff.
@ 2020-01-23 21:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-23 21:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8fc33e6cc10fcd801efff4d8ddbc22011fdd6108

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(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2020-01-23 21:15 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 21:15 pgsql: Fix an oversight in commit 4c70098ff. Tom Lane <tgl@sss.pgh.pa.us>
2020-01-23 21:15 pgsql: Fix an oversight in commit 4c70098ff. Tom Lane <tgl@sss.pgh.pa.us>
2020-01-23 21:15 pgsql: Fix an oversight in commit 4c70098ff. Tom Lane <tgl@sss.pgh.pa.us>
2020-01-23 21:15 pgsql: Fix an oversight in commit 4c70098ff. Tom Lane <tgl@sss.pgh.pa.us>
2020-01-23 21:15 pgsql: Fix an oversight in commit 4c70098ff. Tom Lane <tgl@sss.pgh.pa.us>
2020-01-23 21:15 pgsql: Fix an oversight in commit 4c70098ff. Tom Lane <tgl@sss.pgh.pa.us>
2020-01-23 21:15 pgsql: Fix an oversight in commit 4c70098ff. Tom Lane <tgl@sss.pgh.pa.us>

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