actor.org_unit_parent_protect can fail on inserts
Bug #826844 reported by
Dan Wells
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
High
|
Dan Scott |
Bug Description
EG Version 2.0.8
PG Version 8.4
On a fresh install of 2.0.8, actor.org_
"IF TG_OP = 'INSERT' OR NEW.parent_ou IS DISTINCT FROM OLD.parent_ou THEN"
fails for me because the 'IS DISTINCT FROM' happens before the 'INSERT' check, and and that fails because there is no 'OLD' variable for INSERTs.
I am far from a PL/pgSQL expert, but attached is an alternate version which seems to work. I suspect there may be some more conventional (i.e. better style) way to do this in this language, but I'll leave it to others to make that determination.
Thanks,
Dan
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I'm working up a branch for this, will push early tomorrow.