gpt4 book ai didi

database - 错误 : invalid value for parameter "TimeZone": "Canada/East-Saskatchewan"

转载 作者:太空狗 更新时间:2023-10-30 01:53:55 25 4
gpt4 key购买 nike

我正在导入一个使用 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)] 处理 TOC 时出错:
pg_restore: [archiver (db)] 来自 TOC 条目 9024 的错误; 0 48454 表数据时区 skysms
pg_restore:[archiver (db)] 表“timezone”的 COPY 失败:错误:参数“TimeZone”的无效值:“Canada/East-Saskatchewan”
上下文:SQL 语句“将本地时区设置为‘加拿大/东萨斯喀彻温’”
PL/pgSQL 函数 display_in_other_tz(timestamp with time zone,text,text) line 7 at EXECUTE statement
复制时区,第 315 行:“315 Canada/East-Saskatchewan\N\N”

最佳答案

时区 Canada/East-Saskatchewan 曾经是一个有效的时区标识符。它是 America/Regina 时区的链接/别名。但是,在上一版本 (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

关于database - 错误 : invalid value for parameter "TimeZone": "Canada/East-Saskatchewan",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47618861/

25 4 0