Re: [GENERAL] Pending trigger events on ALTER TABLE in 8.3

2011-08-01 Thread Reuven M. Lerner
Thanks for the great explanation! Now it's time to do some detective work... Reuven -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Pending trigger events on ALTER TABLE in 8.3

2011-08-01 Thread Tom Lane
"Reuven M. Lerner" writes: > Reports=# \d "RecipeNumericParameterSnapshot" > Foreign-key constraints: > "RecipeNumericParameterSnapshot_RecipeSnapshot_fk" FOREIGN KEY > ("RecipeSnapshotID") REFERENCES "RecipeSnapshot"("ID") ON DELETE CASCADE > DEFERRABLE INITIALLY DEFERRED OK, this is abou

Re: [GENERAL] Pending trigger events on ALTER TABLE in 8.3

2011-08-01 Thread Reuven M. Lerner
Hi again. Tom wrote: Um ... I don't see anything about RecipeNumericParameterSnapshot here. Grr... I meant to put: Reports=# \d "RecipeNumericParameterSnapshot" Table "public.RecipeNumericParameterSnapshot" Column | Type | Modifiers --

Re: [GENERAL] Pending trigger events on ALTER TABLE in 8.3

2011-08-01 Thread Tom Lane
"Reuven M. Lerner" writes: > Hi, everyone. Tom wrote: >> Exactly what it says: not-yet-processed trigger events for the table. >> If you don't have any explicit triggers on the table, maybe they are >> FOREIGN KEY implementation triggers. It's hard to say more than that >> when you haven't sho

Re: [GENERAL] Pending trigger events on ALTER TABLE in 8.3

2011-08-01 Thread Reuven M. Lerner
Hi, everyone. Tom wrote: Exactly what it says: not-yet-processed trigger events for the table. If you don't have any explicit triggers on the table, maybe they are FOREIGN KEY implementation triggers. It's hard to say more than that when you haven't shown us any of the DDL. Sorry; I'm enc

Re: [GENERAL] Pending trigger events on ALTER TABLE in 8.3

2011-08-01 Thread Tom Lane
"Reuven M. Lerner" writes: > Outside of a transaction, this function works just great. But inside of > a transaction, we get the following error message: > Error 55006: Cannot ALTER TABLE "RecipeNumericParameterSnapshot" because > it has pending trigger events. > Now, I've never seen this bef

[GENERAL] Pending trigger events on ALTER TABLE in 8.3

2011-08-01 Thread Reuven M. Lerner
Problem: A client of mine, running PostgreSQL 8.3, wrote his application such that it depends on column order. (He now realizes that this was a really bad idea.) Among the things I'm doing for him is helping with upgrades and downgrades. So I wrote a little upgrade script that changes a t