Got it working!
Thanks, kgignatyev, for all of your help, and especially for running a test for me. That is fantastic.
We were using a 7.4 postgres driver and thought we were using a 7.4 db as well, but it turns out it was only 7.2.1. So we upgraded. The documentation for the postgres 7.4 says it supports TRUNCATE inside transactions. So, 7.2 must not.
Somewhere a transaction is being (implicitly) created because once I truncate, the db table locks. Unfortunately session.close() does not release the table. I have to create a new transaction and commit it before the table is realeased. But at least it does get released. I will probably just use an explicit transaction around the above code block just to be, well, explicit.
I really appriciate all your help, kgignatyev. Thanks again.
_________________ - shaler
|