我有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')
答案 0 :(得分:1)
放下触发器:
drop trigger remove_unused_large_objects on photo;
答案 1 :(得分:0)
尝试使用此
从照片中删除,其中primarykey ='您要删除';