Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbca6d83

Browse files
committed
Suppress "Factory" zone in pg_timezone_names view for tzdata >= 2016g.
IANA got rid of the really silly "abbreviation" and replaced it with onethat's only moderately silly. But it's still pointless, so keep on notshowing it.
1 parent22cf976 commitbca6d83

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

‎src/backend/utils/adt/datetime.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4763,8 +4763,17 @@ pg_timezone_names(PG_FUNCTION_ARGS)
47634763
&tzoff,&tm,&fsec,&tzn,tz)!=0)
47644764
continue;/* ignore if conversion fails */
47654765

4766-
/* Ignore zic's rather silly "Factory" time zone */
4767-
if (tzn&&strcmp(tzn,"Local time zone must be set--see zic manual page")==0)
4766+
/*
4767+
* Ignore zic's rather silly "Factory" time zone. The long string
4768+
* about "see zic manual page" is used in tzdata versions before
4769+
* 2016g; we can drop it someday when we're pretty sure no such data
4770+
* exists in the wild on platforms using --with-system-tzdata. In
4771+
* 2016g and later, the time zone abbreviation "-00" is used for
4772+
* "Factory" as well as some invalid cases, all of which we can
4773+
* reasonably omit from the pg_timezone_names view.
4774+
*/
4775+
if (tzn&& (strcmp(tzn,"-00")==0||
4776+
strcmp(tzn,"Local time zone must be set--see zic manual page")==0))
47684777
continue;
47694778

47704779
/* Found a displayable zone */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp