我正在向一个具有序列类型主键的A表中插入一个值。我想使用查询返回的值作为B表的外键,但是我收到了这个错误信息:ERROR: insert or update on table "tb_midia_pessoa" violates foreign key constraint "tb_midia_pessoa_id_pessoa_fkey" DETAIL: Key (id_pessoa)=(30) is not present in table "tb_pessoa".
如何在不启动新事务或删除外键约束的情况下实现这一点呢?
谢谢!Pedro