• Tom Lane's avatar
    Fix sloppy usage of TRIGGER_FIRED_BEFORE/TRIGGER_FIRED_AFTER. · caaf2e84
    Tom Lane authored
    Various places were testing TRIGGER_FIRED_BEFORE() where what they really
    meant was !TRIGGER_FIRED_AFTER(), or vice versa.  This needs to be cleaned
    up because there are about to be more than two possible states.
    
    We might want to note this in the 9.1 release notes as something for
    trigger authors to double-check.
    
    For consistency's sake I also changed some places that assumed that
    TRIGGER_FIRED_FOR_ROW and TRIGGER_FIRED_FOR_STATEMENT are necessarily
    mutually exclusive; that's not in immediate danger of breaking, but
    it's still sloppier than it should be.
    
    Extracted from Dean Rasheed's patch for triggers on views.  I'm committing
    this separately since it's an identifiable separate issue, and is the
    only reason for the patch to touch most of these particular files.
    caaf2e84
tsvector_op.c 30.5 KB