【发布时间】:2017-12-03 13:28:27
【问题描述】:
我正在导入一个使用 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"
【问题讨论】:
-
你在
select * from pg_timezone_names where name like 'Canada%';之间看到了吗?.. -
不,只有
Canada/Saskatchewan。 -
至于
FUNCTION pg_catalog.pg_timezone_names(OUT name text, OUT abbrev text, OUT utc_offset interval, OUT is_dst boolean),您需要接近 postgres 源的 smbd 帮助。我认为没有EastSaskatchewan是一个错误...... -
原服务器中存在。我不确定它是如何到达那里的(或者为什么它不在我的本地数据库中)。
标签: database postgresql timezone database-restore