Forum OpenACS Q&A: Re: File storage/CR anomaly after upgrade.
let us try to do this stepwise. You said:
* When deleting a version of a file, it complains that there is no such function content_revision__del(integer). When connecting to the DB with psql, the function appears as defined, I'm even able to execute the query to delete a revision by typing "select content_revision__del(22332)". There is no way to delete a versin.
Are you sure, you are connecting from your openacs installation and from psql to the same database of the same postgres installation (i assume, you have a postgres 7.4 and a postgres 8.1 installation)?
You were right. I had both PgSQL 7.4 and 8.1 running in parallel and the psql client connected to the wrong database. I had to add a -p :port: to make sure I talked to the right server and the right path to make sure the psql client was chosen correctly (I have both executables but only one of them in my path). I am now connected to the 8.1 server with the 8.1.9 psql client.
After connecting to the right database, I see that the function that appears in the exception (content__revision_del(integer)) is not defined or at least it doesn't appear when typing:
psql> \df content_revision__del
In the second instance running out of the same server, but with a different database, the function content_revision__del does appear when \df is executed in the psql client.
If I manually source the file where such function is defined (acs-content-repository/sql/postgresql/content-revision.sql) the operation is then performed with no exception.
The second anomaly though, deleting a file instead of a revision is still appearing with the same message:
"ERROR: Referential Integrity: attempting to delete live_revision: 347357
The acs-content-repository.info shows version 5.3.2.