[ 
https://issues.apache.org/jira/browse/DERBY-6753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14233956#comment-14233956
 ] 

Mamta A. Satoor commented on DERBY-6753:
----------------------------------------

One last thing on this patch - has following paragraph
If a table with an identity column has an INSERT trigger defined that inserts 
into another
table with another identity column, then the IDENTITY_VAL_LOCAL function will 
return
the generated value for the statement table, and not for the table modified by 
the trigger.
We need to make a similar paragraph fro UPDATE
If a table with an identity column has an UPDATE trigger defined that updates 
another
table with another identity column, then the IDENTITY_VAL_LOCAL function will 
return
the generated value for the statement table, and not for the table modified by 
the trigger.

Please feel free to reword these 2 paragraphs as necessary so it doesn't look 
repetitive. The key here is UPDATE trigger goes with updating another table 
with identity column and INSERT trigger goes with inserting into another table 
with identity column.

Thanks again for updating the docs.

> Docs for IDENTITY_VAL_LOCAL needs to be updated to indicate that the return 
> value will be impacted by single row UPDATE of identity column
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6753
>                 URL: https://issues.apache.org/jira/browse/DERBY-6753
>             Project: Derby
>          Issue Type: Task
>          Components: Documentation
>    Affects Versions: 10.12.0.0
>         Environment: Changes for DERBY-6742 will now make the newly generated 
> value for a single row UPDATE statement available through 
> IDENTITY_VAL_LOCAL(). Current documentation mentions only INSERT statement 
> changing the value of IDENTITY_VAL_LOCAL(). The changes in the doc are very 
> localized and from my search, the changes need to go only in the reference 
> manual. 
> Basically, DERBY-6414 now allows an identity column's value to be updated 
> using DEFAULT clause in UPDATE statement(prior to DERBY-6414, there was no 
> way of updating an identity column). This updated value is available through 
> IDENTITY_VAL_LOCAL if only one row was updated of a table with identity 
> column AND identity column was updated as part of that UPDATE with DEFAULT 
> clause. The rules for UPDATE are same as for INSERT for IDENTITY_VAL_LOCAL. 
> The rules for INSERT are already documented in the reference manual.
>            Reporter: Mamta A. Satoor
>            Assignee: Myrna van Lunteren
>         Attachments: DERBY-6753.diff, crefjavstateautogen.html, 
> rrefidentityvallocal.html
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to