0
我有以下.load文件如何在通過pgloader加載數據時解決這個約束錯誤?
LOAD DATABASE
FROM mysql://user:[email protected]/mydbname
INTO postgresql://[email protected]/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