pg_timezone_names
是一个提供 SET TIMEZONE
识别的时区名称列表的 系统目录 视图。
pg_timezone_names
在 PostgreSQL 8.2 中添加。
按 PostgreSQL 版本定义
pg_timezone_names (PostgreSQL 17)
View "pg_catalog.pg_timezone_names" Column | Type | Collation | Nullable | Default ------------+----------+-----------+----------+--------- name | text | | | abbrev | text | | | utc_offset | interval | | | is_dst | boolean | | |
pg_timezone_names (PostgreSQL 16)
View "pg_catalog.pg_timezone_names" Column | Type | Collation | Nullable | Default ------------+----------+-----------+----------+--------- name | text | | | abbrev | text | | | utc_offset | interval | | | is_dst | boolean | | |
pg_timezone_names (PostgreSQL 15)
View "pg_catalog.pg_timezone_names" Column | Type | Collation | Nullable | Default ------------+----------+-----------+----------+--------- name | text | | | abbrev | text | | | utc_offset | interval | | | is_dst | boolean | | |
pg_timezone_names (PostgreSQL 14)
View "pg_catalog.pg_timezone_names" Column | Type | Collation | Nullable | Default ------------+----------+-----------+----------+--------- name | text | | | abbrev | text | | | utc_offset | interval | | | is_dst | boolean | | |
pg_timezone_names (PostgreSQL 13)
View "pg_catalog.pg_timezone_names" Column | Type | Collation | Nullable | Default ------------+----------+-----------+----------+--------- name | text | | | abbrev | text | | | utc_offset | interval | | | is_dst | boolean | | |
pg_timezone_names (PostgreSQL 12)
View "pg_catalog.pg_timezone_names" Column | Type | Collation | Nullable | Default ------------+----------+-----------+----------+--------- name | text | | | abbrev | text | | | utc_offset | interval | | | is_dst | boolean | | |
pg_timezone_names (PostgreSQL 11)
View "pg_catalog.pg_timezone_names" Column | Type | Collation | Nullable | Default ------------+----------+-----------+----------+--------- name | text | | | abbrev | text | | | utc_offset | interval | | | is_dst | boolean | | |
pg_timezone_names (PostgreSQL 10)
View "pg_catalog.pg_timezone_names" Column | Type | Collation | Nullable | Default ------------+----------+-----------+----------+--------- name | text | | | abbrev | text | | | utc_offset | interval | | | is_dst | boolean | | |
pg_timezone_names (PostgreSQL 9.6)
View "pg_catalog.pg_timezone_names" Column | Type | Modifiers ------------+----------+----------- name | text | abbrev | text | utc_offset | interval | is_dst | boolean |
pg_timezone_names (PostgreSQL 9.5)
View "pg_catalog.pg_timezone_names" Column | Type | Modifiers ------------+----------+----------- name | text | abbrev | text | utc_offset | interval | is_dst | boolean |
pg_timezone_names (PostgreSQL 9.4)
View "pg_catalog.pg_timezone_names" Column | Type | Modifiers ------------+----------+----------- name | text | abbrev | text | utc_offset | interval | is_dst | boolean |
pg_timezone_names (PostgreSQL 9.3)
View "pg_catalog.pg_timezone_names" Column | Type | Modifiers ------------+----------+----------- name | text | abbrev | text | utc_offset | interval | is_dst | boolean |
pg_timezone_names (PostgreSQL 9.2)
View "pg_catalog.pg_timezone_names" Column | Type | Modifiers ------------+----------+----------- name | text | abbrev | text | utc_offset | interval | is_dst | boolean |
pg_timezone_names (PostgreSQL 9.1)
View "pg_catalog.pg_timezone_names" Column | Type | Modifiers ------------+----------+----------- name | text | abbrev | text | utc_offset | interval | is_dst | boolean |
pg_timezone_names (PostgreSQL 9.0)
View "pg_catalog.pg_timezone_names" Column | Type | Modifiers ------------+----------+----------- name | text | abbrev | text | utc_offset | interval | is_dst | boolean |
pg_timezone_names (PostgreSQL 8.4)
View "pg_catalog.pg_timezone_names" Column | Type | Modifiers ------------+----------+----------- name | text | abbrev | text | utc_offset | interval | is_dst | boolean | View definition: SELECT pg_timezone_names.name, pg_timezone_names.abbrev, pg_timezone_names.utc_offset, pg_timezone_names.is_dst FROM pg_timezone_names() pg_timezone_names(name, abbrev, utc_offset, is_dst);
pg_timezone_names (PostgreSQL 8.3)
View "pg_catalog.pg_timezone_names" Column | Type | Modifiers ------------+----------+----------- name | text | abbrev | text | utc_offset | interval | is_dst | boolean | View definition: SELECT pg_timezone_names.name, pg_timezone_names.abbrev, pg_timezone_names.utc_offset, pg_timezone_names.is_dst FROM pg_timezone_names() pg_timezone_names(name, abbrev, utc_offset, is_dst);
pg_timezone_names (PostgreSQL 8.2)
View "pg_catalog.pg_timezone_names" Column | Type | Modifiers ------------+----------+----------- name | text | abbrev | text | utc_offset | interval | is_dst | boolean | View definition: SELECT pg_timezone_names.name, pg_timezone_names.abbrev, pg_timezone_names.utc_offset, pg_timezone_names.is_dst FROM pg_timezone_names() pg_timezone_names(name, abbrev, utc_offset, is_dst);
更改历史记录
自首次添加以来,此视图未进行修改。
- PostgreSQL 8.2
- 添加 (提交 d8b5c95c)
示例
postgres=# SELECT * FROM pg_timezone_names WHERE name like 'Europe/%' ORDER BY name LIMIT 15; name | abbrev | utc_offset | is_dst -------------------+--------+------------+-------- Europe/Amsterdam | CEST | 02:00:00 | t Europe/Andorra | CEST | 02:00:00 | t Europe/Astrakhan | +04 | 04:00:00 | f Europe/Athens | EEST | 03:00:00 | t Europe/Belfast | BST | 01:00:00 | t Europe/Belgrade | CEST | 02:00:00 | t Europe/Berlin | CEST | 02:00:00 | t Europe/Bratislava | CEST | 02:00:00 | t Europe/Brussels | CEST | 02:00:00 | t Europe/Bucharest | EEST | 03:00:00 | t Europe/Budapest | CEST | 02:00:00 | t Europe/Busingen | CEST | 02:00:00 | t Europe/Chisinau | EEST | 03:00:00 | t Europe/Copenhagen | CEST | 02:00:00 | t Europe/Dublin | IST | 01:00:00 | f (15 rows)
参考文献
- PostgreSQL 文档: pg_timezone_names