ERROR: invalid value for parameter "TimeZone": "Canada/East-Saskatchewan"
ERROR: invalid value for parameter "TimeZone": "Canada/East-Saskatchewan"
我正在导入一个使用 psql (PostgreSQL) 9.5.10 的数据库。对于我的本地数据库 v.9.6.5.
这是有问题的部分:
COPY timezone (id, name, windowsname, tzindex) FROM stdin;
...
315 Canada/East-Saskatchewan \N \N
...
这是我遇到的错误:
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 9024; 0 48454 TABLE DATA timezone skysms
pg_restore: [archiver (db)] COPY failed for table "timezone": ERROR: invalid value for parameter "TimeZone": "Canada/East-Saskatchewan"
CONTEXT: SQL statement "SET local timezone to 'Canada/East-Saskatchewan'"
PL/pgSQL function display_in_other_tz(timestamp with time zone,text,text) line 7 at EXECUTE statement
COPY timezone, line 315: "315 Canada/East-Saskatchewan \N \N"
时区 Canada/East-Saskatchewan
曾经是有效的时区标识符。 America/Regina
时区 link/alias。但是,它在上一版本(2017c)中已从 tz 数据库中删除。您可以看到提交 here。
The 2017c release announcement 状态:
Remove Canada/East-Saskatchewan from the 'backward' file, as it exceeded the 14-character limit and was an unused misnomer anyway.
因此,虽然通常 时区标识符不会以这种方式删除,但对于这个特定的时区标识符,由于它的长度,它被认为是必要的。
您可以安全地将 Canada/East-Saskatchewan
的任何条目更新为区域的首选基于位置的形式:America/Regina
.
我正在导入一个使用 psql (PostgreSQL) 9.5.10 的数据库。对于我的本地数据库 v.9.6.5.
这是有问题的部分:
COPY timezone (id, name, windowsname, tzindex) FROM stdin;
...
315 Canada/East-Saskatchewan \N \N
...
这是我遇到的错误:
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 9024; 0 48454 TABLE DATA timezone skysms
pg_restore: [archiver (db)] COPY failed for table "timezone": ERROR: invalid value for parameter "TimeZone": "Canada/East-Saskatchewan"
CONTEXT: SQL statement "SET local timezone to 'Canada/East-Saskatchewan'"
PL/pgSQL function display_in_other_tz(timestamp with time zone,text,text) line 7 at EXECUTE statement
COPY timezone, line 315: "315 Canada/East-Saskatchewan \N \N"
时区 Canada/East-Saskatchewan
曾经是有效的时区标识符。 America/Regina
时区 link/alias。但是,它在上一版本(2017c)中已从 tz 数据库中删除。您可以看到提交 here。
The 2017c release announcement 状态:
Remove Canada/East-Saskatchewan from the 'backward' file, as it exceeded the 14-character limit and was an unused misnomer anyway.
因此,虽然通常 时区标识符不会以这种方式删除,但对于这个特定的时区标识符,由于它的长度,它被认为是必要的。
您可以安全地将 Canada/East-Saskatchewan
的任何条目更新为区域的首选基于位置的形式:America/Regina
.