pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Tweak our special-case logic for the IANA "Factory" timezone. 7+ messages / 1 participants [nested] [flat]
* pgsql: Tweak our special-case logic for the IANA "Factory" timezone. @ 2019-07-26 17:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-07-26 17:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Tweak our special-case logic for the IANA "Factory" timezone. pg_timezone_names() tries to avoid showing the "Factory" zone in the view, mainly because that has traditionally had a very long "abbreviation" such as "Local time zone must be set--see zic manual page", so that showing it messes up psql's formatting of the whole view. Since tzdb version 2016g, IANA instead uses the abbreviation "-00", which is sane enough that there's no reason to discriminate against it. On the other hand, it emerges that FreeBSD and possibly other packagers are so wedded to backwards compatibility that they hack the IANA data to keep the old spelling --- and not just that old spelling, but even older spellings that IANA used back in the stone age. This caused the filter logic to fail to suppress "Factory" at all on such platforms, though the formatting problem is definitely real in that case. To solve both problems, get rid of the hard-wired assumption about exactly what Factory's abbreviation is, and instead reject abbreviations exceeding 31 characters. This will allow Factory to appear in the view if and only if it's using the modern abbreviation. In passing, simplify the code we add to zic.c to support "zic -P" to remove its now-obsolete hacks to not print the Factory zone's abbreviation. Unlike pg_timezone_names(), there's no reason for that code to support old/nonstandard timezone data. Since we generally prefer to keep timezone-related behavior the same in all branches, and since this is arguably a bug fix, back-patch to all supported branches. Discussion: https://postgr.es/m/3961.1564086915@sss.pgh.pa.us Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f227aecb9af753aa559ed488815a94d95fa38b0a Modified Files -------------- src/backend/utils/adt/datetime.c | 17 ++++++++--------- src/timezone/zic.c | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Tweak our special-case logic for the IANA "Factory" timezone. @ 2019-07-26 17:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-07-26 17:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Tweak our special-case logic for the IANA "Factory" timezone. pg_timezone_names() tries to avoid showing the "Factory" zone in the view, mainly because that has traditionally had a very long "abbreviation" such as "Local time zone must be set--see zic manual page", so that showing it messes up psql's formatting of the whole view. Since tzdb version 2016g, IANA instead uses the abbreviation "-00", which is sane enough that there's no reason to discriminate against it. On the other hand, it emerges that FreeBSD and possibly other packagers are so wedded to backwards compatibility that they hack the IANA data to keep the old spelling --- and not just that old spelling, but even older spellings that IANA used back in the stone age. This caused the filter logic to fail to suppress "Factory" at all on such platforms, though the formatting problem is definitely real in that case. To solve both problems, get rid of the hard-wired assumption about exactly what Factory's abbreviation is, and instead reject abbreviations exceeding 31 characters. This will allow Factory to appear in the view if and only if it's using the modern abbreviation. In passing, simplify the code we add to zic.c to support "zic -P" to remove its now-obsolete hacks to not print the Factory zone's abbreviation. Unlike pg_timezone_names(), there's no reason for that code to support old/nonstandard timezone data. Since we generally prefer to keep timezone-related behavior the same in all branches, and since this is arguably a bug fix, back-patch to all supported branches. Discussion: https://postgr.es/m/3961.1564086915@sss.pgh.pa.us Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e49132e633b5af7f26c059ed7d96f62ced683127 Modified Files -------------- src/backend/utils/adt/datetime.c | 17 ++++++++--------- src/timezone/zic.c | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Tweak our special-case logic for the IANA "Factory" timezone. @ 2019-07-26 17:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-07-26 17:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Tweak our special-case logic for the IANA "Factory" timezone. pg_timezone_names() tries to avoid showing the "Factory" zone in the view, mainly because that has traditionally had a very long "abbreviation" such as "Local time zone must be set--see zic manual page", so that showing it messes up psql's formatting of the whole view. Since tzdb version 2016g, IANA instead uses the abbreviation "-00", which is sane enough that there's no reason to discriminate against it. On the other hand, it emerges that FreeBSD and possibly other packagers are so wedded to backwards compatibility that they hack the IANA data to keep the old spelling --- and not just that old spelling, but even older spellings that IANA used back in the stone age. This caused the filter logic to fail to suppress "Factory" at all on such platforms, though the formatting problem is definitely real in that case. To solve both problems, get rid of the hard-wired assumption about exactly what Factory's abbreviation is, and instead reject abbreviations exceeding 31 characters. This will allow Factory to appear in the view if and only if it's using the modern abbreviation. In passing, simplify the code we add to zic.c to support "zic -P" to remove its now-obsolete hacks to not print the Factory zone's abbreviation. Unlike pg_timezone_names(), there's no reason for that code to support old/nonstandard timezone data. Since we generally prefer to keep timezone-related behavior the same in all branches, and since this is arguably a bug fix, back-patch to all supported branches. Discussion: https://postgr.es/m/3961.1564086915@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/8ab66081ca496fd74c406e435e20f4264881a02d Modified Files -------------- src/backend/utils/adt/datetime.c | 17 ++++++++--------- src/timezone/zic.c | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Tweak our special-case logic for the IANA "Factory" timezone. @ 2019-07-26 17:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-07-26 17:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Tweak our special-case logic for the IANA "Factory" timezone. pg_timezone_names() tries to avoid showing the "Factory" zone in the view, mainly because that has traditionally had a very long "abbreviation" such as "Local time zone must be set--see zic manual page", so that showing it messes up psql's formatting of the whole view. Since tzdb version 2016g, IANA instead uses the abbreviation "-00", which is sane enough that there's no reason to discriminate against it. On the other hand, it emerges that FreeBSD and possibly other packagers are so wedded to backwards compatibility that they hack the IANA data to keep the old spelling --- and not just that old spelling, but even older spellings that IANA used back in the stone age. This caused the filter logic to fail to suppress "Factory" at all on such platforms, though the formatting problem is definitely real in that case. To solve both problems, get rid of the hard-wired assumption about exactly what Factory's abbreviation is, and instead reject abbreviations exceeding 31 characters. This will allow Factory to appear in the view if and only if it's using the modern abbreviation. In passing, simplify the code we add to zic.c to support "zic -P" to remove its now-obsolete hacks to not print the Factory zone's abbreviation. Unlike pg_timezone_names(), there's no reason for that code to support old/nonstandard timezone data. Since we generally prefer to keep timezone-related behavior the same in all branches, and since this is arguably a bug fix, back-patch to all supported branches. Discussion: https://postgr.es/m/3961.1564086915@sss.pgh.pa.us Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d304313b071a8314dea8a116271d66172536fe13 Modified Files -------------- src/backend/utils/adt/datetime.c | 17 ++++++++--------- src/timezone/zic.c | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Tweak our special-case logic for the IANA "Factory" timezone. @ 2019-07-26 17:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-07-26 17:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Tweak our special-case logic for the IANA "Factory" timezone. pg_timezone_names() tries to avoid showing the "Factory" zone in the view, mainly because that has traditionally had a very long "abbreviation" such as "Local time zone must be set--see zic manual page", so that showing it messes up psql's formatting of the whole view. Since tzdb version 2016g, IANA instead uses the abbreviation "-00", which is sane enough that there's no reason to discriminate against it. On the other hand, it emerges that FreeBSD and possibly other packagers are so wedded to backwards compatibility that they hack the IANA data to keep the old spelling --- and not just that old spelling, but even older spellings that IANA used back in the stone age. This caused the filter logic to fail to suppress "Factory" at all on such platforms, though the formatting problem is definitely real in that case. To solve both problems, get rid of the hard-wired assumption about exactly what Factory's abbreviation is, and instead reject abbreviations exceeding 31 characters. This will allow Factory to appear in the view if and only if it's using the modern abbreviation. In passing, simplify the code we add to zic.c to support "zic -P" to remove its now-obsolete hacks to not print the Factory zone's abbreviation. Unlike pg_timezone_names(), there's no reason for that code to support old/nonstandard timezone data. Since we generally prefer to keep timezone-related behavior the same in all branches, and since this is arguably a bug fix, back-patch to all supported branches. Discussion: https://postgr.es/m/3961.1564086915@sss.pgh.pa.us Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/55862b2e93030b6720123f888217a557532dd894 Modified Files -------------- src/backend/utils/adt/datetime.c | 17 ++++++++--------- src/timezone/zic.c | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Tweak our special-case logic for the IANA "Factory" timezone. @ 2019-07-26 17:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-07-26 17:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Tweak our special-case logic for the IANA "Factory" timezone. pg_timezone_names() tries to avoid showing the "Factory" zone in the view, mainly because that has traditionally had a very long "abbreviation" such as "Local time zone must be set--see zic manual page", so that showing it messes up psql's formatting of the whole view. Since tzdb version 2016g, IANA instead uses the abbreviation "-00", which is sane enough that there's no reason to discriminate against it. On the other hand, it emerges that FreeBSD and possibly other packagers are so wedded to backwards compatibility that they hack the IANA data to keep the old spelling --- and not just that old spelling, but even older spellings that IANA used back in the stone age. This caused the filter logic to fail to suppress "Factory" at all on such platforms, though the formatting problem is definitely real in that case. To solve both problems, get rid of the hard-wired assumption about exactly what Factory's abbreviation is, and instead reject abbreviations exceeding 31 characters. This will allow Factory to appear in the view if and only if it's using the modern abbreviation. In passing, simplify the code we add to zic.c to support "zic -P" to remove its now-obsolete hacks to not print the Factory zone's abbreviation. Unlike pg_timezone_names(), there's no reason for that code to support old/nonstandard timezone data. Since we generally prefer to keep timezone-related behavior the same in all branches, and since this is arguably a bug fix, back-patch to all supported branches. Discussion: https://postgr.es/m/3961.1564086915@sss.pgh.pa.us Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f6c7c64e9fc8cdc8217fbc46a00e94b4e33856d2 Modified Files -------------- src/backend/utils/adt/datetime.c | 17 ++++++++--------- src/timezone/zic.c | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Tweak our special-case logic for the IANA "Factory" timezone. @ 2019-07-26 17:07 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2019-07-26 17:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Tweak our special-case logic for the IANA "Factory" timezone. pg_timezone_names() tries to avoid showing the "Factory" zone in the view, mainly because that has traditionally had a very long "abbreviation" such as "Local time zone must be set--see zic manual page", so that showing it messes up psql's formatting of the whole view. Since tzdb version 2016g, IANA instead uses the abbreviation "-00", which is sane enough that there's no reason to discriminate against it. On the other hand, it emerges that FreeBSD and possibly other packagers are so wedded to backwards compatibility that they hack the IANA data to keep the old spelling --- and not just that old spelling, but even older spellings that IANA used back in the stone age. This caused the filter logic to fail to suppress "Factory" at all on such platforms, though the formatting problem is definitely real in that case. To solve both problems, get rid of the hard-wired assumption about exactly what Factory's abbreviation is, and instead reject abbreviations exceeding 31 characters. This will allow Factory to appear in the view if and only if it's using the modern abbreviation. In passing, simplify the code we add to zic.c to support "zic -P" to remove its now-obsolete hacks to not print the Factory zone's abbreviation. Unlike pg_timezone_names(), there's no reason for that code to support old/nonstandard timezone data. Since we generally prefer to keep timezone-related behavior the same in all branches, and since this is arguably a bug fix, back-patch to all supported branches. Discussion: https://postgr.es/m/3961.1564086915@sss.pgh.pa.us Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d095b2fe676a929837715ece04ae19e0d8a1dcc3 Modified Files -------------- src/backend/utils/adt/datetime.c | 17 ++++++++--------- src/timezone/zic.c | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2019-07-26 17:07 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-07-26 17:07 pgsql: Tweak our special-case logic for the IANA "Factory" timezone. Tom Lane <tgl@sss.pgh.pa.us> 2019-07-26 17:07 pgsql: Tweak our special-case logic for the IANA "Factory" timezone. Tom Lane <tgl@sss.pgh.pa.us> 2019-07-26 17:07 pgsql: Tweak our special-case logic for the IANA "Factory" timezone. Tom Lane <tgl@sss.pgh.pa.us> 2019-07-26 17:07 pgsql: Tweak our special-case logic for the IANA "Factory" timezone. Tom Lane <tgl@sss.pgh.pa.us> 2019-07-26 17:07 pgsql: Tweak our special-case logic for the IANA "Factory" timezone. Tom Lane <tgl@sss.pgh.pa.us> 2019-07-26 17:07 pgsql: Tweak our special-case logic for the IANA "Factory" timezone. Tom Lane <tgl@sss.pgh.pa.us> 2019-07-26 17:07 pgsql: Tweak our special-case logic for the IANA "Factory" timezone. 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