Hello Martha,

Yes, you will want to add that line between the UPDATE and the first ALTER 
TABLE.  Since 0706 and 0710 are two versions of the same idea, the upgrade file 
probably combines the two (so that is where the line came from).  To help 
explain what is happening, some of the constraints on the table are (by 
default) deferred while in a transaction, so that line tells the DB to go ahead 
and process them right away so we can alter the table in this same transaction.

Dan

-- 
*********************************************************************************
Daniel Wells, Library Programmer Analyst [email protected]
Hekman Library at Calvin College
616.526.7133


>>> On 8/14/2012 at 4:42 PM, Martha Driscoll <[email protected]> wrote:
> I'm trying to upgrade a training server from 2.2-rc1 to 2.2.1.  The last 
> script registered in config.upgrade_log is 0709 so I ran 0710 but got an 
> error:
> 
> Here is what I typed:
> psql -U evergreen -h localhost -v eg_version=null -f 0710*
> 
> Here is what I got:
> ERROR:  cannot ALTER TABLE "issuance" because it has pending trigger events
> 
> I looked through the 2.1-2.2-upgrade-db.sql script and it contains this 
> line after 'SELECT evergreen.upgrade_deps_block_check('0710', :eg_version);'
> 
> -- If we don't do this, we have unprocessed triggers and we can't alter 
> the table
> SET CONSTRAINTS serial.issuance_caption_and_pattern_fkey IMMEDIATE;
> 
> Should I just add that to the 0710 script or are there other differences 
> I should be aware of?

Reply via email to