Hi Amy! Not that I completely understand it, but I run *dspace=# \set a 15b3ebc4-ae05-461e-ab9d-3a39bdb1bb50*
*dspace=# SELECT requestitem_id AS b FROM requestitem WHERE bitstream_id = :'a'; b--- 2 3(2 rows)* and then *dspace=# UPDATE requestitem SET bitstream_id = null WHERE requestitem_id = 2;UPDATE 1dspace=# UPDATE requestitem SET bitstream_id = null WHERE requestitem_id = 3;UPDATE 1* Problem solved! Thanks a lot! Cleanup successfully finished now. WBR, Andrew четвер, 21 березня 2024 р. о 22:43:11 UTC+2 Amy Ball Wicklund пише: > You could try substituting requestitem_id for item_id in those same > queries. It's the Primary Key in the requestitem table, and thus cannot be > empty, so you should get 2 unique values that you can use to update the > records. You will just have to run the update query for each value returned. > > On Sunday, March 17, 2024 at 8:21:46 AM UTC-7 Andrew K wrote: > >> For clarity, the error is >> *Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on >> table "bitstream" violates foreign key constraint >> "requestitem_bitstream_id_fkey" on table "requestitem"* >> >> * Detail: Key (uuid)=(15b3ebc4-ae05-461e-ab9d-3a39bdb1bb50) is still >> referenced from table "requestitem".* >> неділю, 17 березня 2024 р. о 16:07:38 UTC+2 Andrew K пише: >> >> Hi! >> I have the same error on cleanup. Trying to use this method to fix it. >> But I receive 2 empty rows here instead of some uuids >> >> >> *\set a 15b3ebc4-ae05-461e-ab9d-3a39bdb1bb50 dspace=# SELECT item_id AS b >> FROM requestitem WHERE bitstream_id = :'a';*b >> - - - >> >> >> (2 rows) >> >> This looks OK though >> *dspace=# SELECT deleted FROM bitstream WHERE uuid = :'a';* >> deleted >> --------- >> t >> (1 row) >> >> What do I do next? >> >> Thanks, >> Andrew >> >> -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/94075d72-2b10-4cb7-84ff-af042618a163n%40googlegroups.com.