Forum OpenACS Q&A: Re: inserting into cr_revisionsi

Collapse
Posted by Dave Bauer on
This is a pain to track down.

The cr_revisionsi view is created by content_type__refresh_view and content_type__regresh_trigger. The trigger inserts into the cr_revisions table.

The plpgsql procs are defined in packages/acs-content-repository/sql/postgresql/content-type.sql

One way to track it down is to add some debugging notices into refresh trigger code that end up in the actual trigger procedure. Then when you do the insert you should see the debugging messages. After redefining the plpglsql function you just run content_type__refresh_view('content_revision') to recreate the view and trigger.