1

我有带bytea字段的表。当我尝试从该表中删除一行时,我收到这样的错误:

[42704] ERROR: large object 0 does not exist

你能在这种情况下帮助我吗?

编辑。来自命令的信息\d photo

    Table "public.photo"
   Column   |          Type          | Modifiers 
------------+------------------------+-----------
 id         | character varying(255) | not null
 ldap_name  | character varying(255) | not null
 file_name  | character varying(255) | not null
 image_data | bytea                  | 
Indexes:
    "pk_photo" PRIMARY KEY, btree (id)
    "photo_file_name_key" UNIQUE CONSTRAINT, btree (file_name)
    "photo_ldap_name" btree (ldap_name)
Triggers:
    remove_unused_large_objects BEFORE DELETE OR UPDATE ON photo FOR EACH ROW EXECUTE PROCEDURE lo_manage('image_data')
4

2 回答 2

1

放下触发器:

drop trigger remove_unused_large_objects on photo;
于 2016-08-02T10:49:25.263 回答
0

尝试使用这个

从照片中删除 primarykey = '你要删除';

于 2016-08-02T10:33:05.213 回答