postgresql/src
Tom Lane 32c9950b39 Don't require dynamic timezone abbreviations to match underlying time zone.
Previously, we threw an error if a dynamic timezone abbreviation did not
match any abbreviation recorded in the referenced IANA time zone entry.
That seemed like a good consistency check at the time, but it turns out
that a number of the abbreviations in the IANA database are things that
Olson and crew made up out of whole cloth.  Their current policy is to
remove such names in favor of using simple numeric offsets.  Perhaps
unsurprisingly, a lot of these made-up abbreviations have varied in meaning
over time, which meant that our commit b2cbced9e and later changes made
them into dynamic abbreviations.  So with newer IANA database versions
that don't mention these abbreviations at all, we fail, as reported in bug
#14307 from Neil Anderson.  It's worse than just a few unused-in-the-wild
abbreviations not working, because the pg_timezone_abbrevs view stops
working altogether (since its underlying function tries to compute the
whole view result in one call).

We considered deleting these abbreviations from our abbreviations list, but
the problem with that is that we can't stay ahead of possible future IANA
changes.  Instead, let's leave the abbreviations list alone, and treat any
"orphaned" dynamic abbreviation as just meaning the referenced time zone.
It will behave a bit differently than it used to, in that you can't any
longer override the zone's standard vs. daylight rule by using the "wrong"
abbreviation of a pair, but that's better than failing entirely.  (Also,
this solution can be interpreted as adding a small new feature, which is
that any abbreviation a user wants can be defined as referencing a time
zone name.)

Back-patch to all supported branches, since this problem affects all
of them when using tzdata 2016f or newer.

Report: <20160902031551.15674.67337@wrigleys.postgresql.org>
Discussion: <6189.1472820913@sss.pgh.pa.us>
2016-09-02 17:29:31 -04:00
..
backend Don't require dynamic timezone abbreviations to match underlying time zone. 2016-09-02 17:29:31 -04:00
bin Fix initdb misbehavior when user mis-enters superuser password. 2016-08-30 15:25:01 -04:00
common pgindent run for 9.6 2016-06-09 18:02:36 -04:00
fe_utils Fix assorted places in psql to print version numbers >= 10 in new style. 2016-08-16 15:58:46 -04:00
include Update comments to reflect code rearrangement. 2016-08-31 12:39:58 +05:30
interfaces Add a nonlocalized version of the severity field to client error messages. 2016-08-26 16:20:24 -04:00
makefiles Fix typos in comments and doc 2016-01-28 16:47:36 +09:00
pl Translation updates 2016-08-29 12:00:00 -04:00
port Promote pg_dumpall shell/connstr quoting functions to src/fe_utils. 2016-08-08 10:07:46 -04:00
template Remove some remains from Alpha support removal 2015-10-29 16:40:14 -04:00
test Don't require dynamic timezone abbreviations to match underlying time zone. 2016-09-02 17:29:31 -04:00
timezone Update time zone data files to tzdata release 2016f. 2016-08-05 12:59:29 -04:00
tools Final pgindent + perltidy run for 9.6. 2016-08-15 13:42:51 -04:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
Makefile.global.in Provide and use a makefile target to build all generated headers. 2016-07-01 15:09:02 -04:00
Makefile.shlib Make the AIX case of Makefile.shlib safe for parallel make. 2016-07-23 20:30:03 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00