我有以下 .load 文件
LOAD DATABASE
FROM mysql://user:password@remotelocation/mydbname
INTO postgresql://user@localhost/dbname
WITH data only,truncate, workers = 8, concurrency = 1
SET maintenance_work_mem to '128MB',
work_mem to '12MB',
search_path to 'mydbname'
CAST type datetime to timestamptz drop default drop not null using zero-dates-to-null,
type mediumint with extra auto_increment to bigserial,
type date drop not null drop default using zero-dates-to-null,
type tinyint to boolean using tinyint-to-boolean;
我得到错误
Database error 2BP01: cannot drop constraint random_pkey on table random because other objects depend on it.
我可以在不删除密钥的情况下加载数据吗?我也尝试将disable triggers
参数添加到 with 子句中,但效果不佳。
我使用的是 postgre 9.6,pgloader 的版本号是 3.3.2