Forum OpenACS Q&A: Why can I not delete unmounted packages?

I have not yet managed to delete unmounted packages in openacs 4.6. I have orphaned instances of packages now which need to be removed. Can anyone post for me a safe way using queries to remove Instances from the database?
Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

Thanks
Richard
Collapse
Posted by Don Baccus on
Which version of PG are you using?  PG 7.3 doesn't delete indexes automatically unless you say "cascade" when dropping tables while AFAIK PG 7.2 doesn't support the "cascade" syntax, leaving us 'tween a rock and a hard place.

I just ran into this recently ...

Have you tried "uninstall this package" in the APM?  Click on the package link on the APM main page, the link is at the bottom.  This may or may not work, unfortunately some packages aren't too bright about removing themselves if there's content.

Collapse
Posted by Richard Hamilton on
Don,

Am using 7.2.3 and the uninstall package link doesn't work because there was an orphaned content item left behind from the first attempt to install. This issue relates to the problems highlighted on the forum relating to integrity constraints causing the uninstall to fail.

I deleted the items manually from the static pages tables using sql in psql and then the uninstall worked.

Thanks for the reply.

R.

Collapse
Posted by Mark Aufflick on
Another neat way to manually deal with orphaned content items and folders is to install the cms package, and you can browse around the content repository tree.
Collapse
Posted by Richard Hamilton on
Great, thanks I'll try it.

Regards
Richard