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
Support GENERATED ALWAYS identity columns and OVERRIDE clause [CORE5463] #5733
Comments
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @asfernandes |
Modified by: @asfernandessummary: Support GENERATED ALWAYS identity columns => Support GENERATED ALWAYS identity columns and OVERRIDE clause |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 4.0 Alpha 1 [ 10731 ] |
Commented by: @pavel-zotov Note at line after 'Statement failed, SQLSTATE = 42000' in the following test:C:\TEMP>isql /:e40
|
Modified by: @pavel-zotovAttachment: overriding-system-value-error-message-is-cuted.png [ 13074 ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Done successfully |
Commented by: @asfernandes It's reported in the feature commit message. It seems a general problem for longer messages and I didn't looked at it yet. |
Commented by: @pavel-zotov $FB_HOME/doc\/sql.extensions/README.identity_columns.txt says:Implementation:
|
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: @asfernandes > ID 5 -- Why ?? Fixed. |
Submitted by: @asfernandes
Is related to CORE5460
Attachments:
overriding-system-value-error-message-is-cuted.png
Quoting SQL standard of INSERT command:
7) If the <insert column list> is omitted, then an <insert column list>
that identifies all columns of T in the
ascending sequence of their ordinal positions within T is implicit.
10) If <contextually typed table value constructor> CTTVC is specified, then every <contextually typed row
value constructor element> simply contained in CTTVC whose positionally corresponding <column name>
in <insert column list> references a column of which some underlying column is a generated column shall
be a <default specification>.
11) Case:
b) If for some n, some underlying column of the column referenced by the <column name> CN contained
in the n-th ordinal position in <insert column list> is an identity column, system-time period start
column, or system-time period end column whose descriptor includes an indication that values are
always generated, then
Case:
i) If <from subquery> is specified, then <override clause> shall be specified.
iii) If the n-th <contextually typed row value constructor element> simply contained in any <contextually
typed row value constructor> simply contained in the <contextually typed table value
constructor> is not a <default specification>, then <override clause> shall be specified.
NOTE 516 — The preceding subrule does not cover all possibilities. The remaining possibilities are where <default
specification> is specified for every identity column, or for a system-time period start column or system-time period
end column, in which case it is immaterial whether <override clause> is specified or not.
c) If for some n, some underlying column of the column referenced by the <column name> CN contained
in the n-th ordinal position in <insert column list> is an identity column whose descriptor includes an
indication that values are generated by default, then if <override clause> is specified, then <override
clause> shall specify OVERRIDING USER VALUE.
e) Otherwise, <override clause> shall not be specified.
Commits: 9517964 3ca6fc1
The text was updated successfully, but these errors were encountered: