New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong syntax with CREATE TRIGGER ... ON <table> used with POSITION [CORE5545] #5813
Comments
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @mrotteveel Although you are right, please ensure this is fixed in a backwards compatible way, as this has been this way since the introduction of SQL:2003-style create trigger in Firebird 2.1 |
Commented by: @asfernandes Clauses could be made to be anywhere, but definitelly it would be wrong to have POSITION in the middle of something. My opinion is to fix the error in v4. People should test their applications when migrating major versions and DDL is more flexible to changes. |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 4.0 Alpha 1 [ 10731 ] |
Commented by: @pavel-zotov It seems that now one can NOT to use old syntax of [re]create trigger DDL. This is what i see in the build of 24-may-2017: C:\MIX\firebird\QA\fbt-repo\tmp>C:\MIX\firebird\FB40Cs\isql /:e40 -z -i c5545.sql
-- did NOT work before fix core-5545, must work now: (and this is expected on THAT build) But on current build (19-jun-2017) we have: C:\MIX\firebird\QA\fbt-repo\tmp>C:\MIX\firebird\FB40\isql /:e40 -z -i c5545.sql
Statement failed, SQLSTATE = 42000 |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Deferred Test Details: See comment 22/Jun/17 05:11 AM |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Deferred => Done successfully Test Details: See comment 22/Jun/17 05:11 AM => |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @asfernandes
I understand that "ON <table>" is complement part to BEFORE INSERT, so POSITION must be after both, not in the middle.
Test case:
recreate table t (n integer);
-- works
recreate trigger t1 before insert position 1 on t as begin end;
-- don't work
recreate trigger t1 before insert on t position 1 as begin end;
Commits: 92be5d3
The text was updated successfully, but these errors were encountered: