mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-04 18:17:22 +02:00
Suppress "Factory" zone in pg_timezone_names view for tzdata >= 2016g.
IANA got rid of the really silly "abbreviation" and replaced it with one that's only moderately silly. But it's still pointless, so keep on not showing it.
This commit is contained in:
parent
5508d0c0b2
commit
9cfe353c51
@ -4823,8 +4823,17 @@ pg_timezone_names(PG_FUNCTION_ARGS)
|
|||||||
&tzoff, &tm, &fsec, &tzn, tz) != 0)
|
&tzoff, &tm, &fsec, &tzn, tz) != 0)
|
||||||
continue; /* ignore if conversion fails */
|
continue; /* ignore if conversion fails */
|
||||||
|
|
||||||
/* Ignore zic's rather silly "Factory" time zone */
|
/*
|
||||||
if (tzn && strcmp(tzn, "Local time zone must be set--see zic manual page") == 0)
|
* Ignore zic's rather silly "Factory" time zone. The long string
|
||||||
|
* about "see zic manual page" is used in tzdata versions before
|
||||||
|
* 2016g; we can drop it someday when we're pretty sure no such data
|
||||||
|
* exists in the wild on platforms using --with-system-tzdata. In
|
||||||
|
* 2016g and later, the time zone abbreviation "-00" is used for
|
||||||
|
* "Factory" as well as some invalid cases, all of which we can
|
||||||
|
* reasonably omit from the pg_timezone_names view.
|
||||||
|
*/
|
||||||
|
if (tzn && (strcmp(tzn, "-00") == 0 ||
|
||||||
|
strcmp(tzn, "Local time zone must be set--see zic manual page") == 0))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Found a displayable zone */
|
/* Found a displayable zone */
|
||||||
|
Loading…
Reference in New Issue
Block a user