Skip to content

ALTER TRIGGER validation should report 'trigger not found' instead of 'column does not belong' #8984

@arvanus

Description

@arvanus

Description

When attempting to execute ALTER TRIGGER on a non-existent trigger, the error message reports a column validation error instead of a more appropriate 'trigger not found' message.

Steps to Reproduce

SET TERM ^ ;
ALTER TRIGGER DUMMY_NAME_NOT_FOUND_AIUD0 ACTIVE
AFTER INSERT OR UPDATE OR DELETE POSITION 0
AS
begin
   new.dummy = false;
end
^
SET TERM ; ^

Current Error

SQL Message : -206
Column does not belong to referenced table

Engine Code    : 335544351
Engine Message :
unsuccessful metadata update
ALTER TRIGGER DUMMY_NAME_NOT_FOUND_AIUD0 failed
Dynamic SQL Error
SQL error code = -206
Column unknown
NEW.DUMMY

Expected Error

trigger DUMMY_NAME_NOT_FOUND_AIUD0 not found

Notes

This is a cosmetic issue in validation order. The trigger existence should be validated before attempting to validate the columns referenced in the trigger body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions