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
RETURNING sometimes delivers incorrect value with updatable views [DOC85] #95
Comments
Thread is: http://fb-list-archive.s3-website-eu-west-1.amazonaws.com/firebird-support/2013/2/120653.html This is still reproducible in Firebird 4.0, but I would think this is a bug that needs to be fixed in Firebird. |
Thinking some more about this: it works correctly without the trigger (as the view is already updatable). If the view is defined, then the definer of the view takes responsibility for redirecting it (as the trigger could also affect multiple tables, etc). |
So i nthe end, is it a bug in the core or in the docs? Cause i wonder if core devs would look here a lot... ...and even Denis |
This issue tracker is only about documentation. It is still open because I haven't yet decided on where or how to document it. As to whether this is something that needs to change in Firebird, Dmitry said back in 2013:
One of the reasons is that this is complex. A trigger defining an updatable view could result in actions that leaves no row to return values from, or multiple rows, or a row with a different RDB$DB_KEY than the original, etc. That is why having the writer of the trigger perform the necessary mapping to the |
The associated issue for Firebird itself is FirebirdSQL/firebird/issues/5529 (and maybe FirebirdSQL/firebird/issues/1453) |
Added information in fblangref50 |
Submitted by: @paulvink
RETURNING sometimes delivers an incorrect value in the case of updatable views with generated, default or computed fields, unless the value is explicitly assigned to the NEW variable. This should be documented.
For details, see firebird-support thread "INSERT ... RETURNING and updatable view" starting 2 Feb 2013.
The text was updated successfully, but these errors were encountered: