[teiid-issues] [JBoss JIRA] (TEIID-5773) Allow for generated_key retrieval at a session level
Steven Hawkins (Jira)
issues at jboss.org
Wed Jun 19 18:32:00 EDT 2019
[ https://issues.jboss.org/browse/TEIID-5773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Hawkins resolved TEIID-5773.
-----------------------------------
Resolution: Done
Updated the generated_key logic to use a session variable. The doc was updated as well to indicate the last value for the session is returned.
> Allow for generated_key retrieval at a session level
> ----------------------------------------------------
>
> Key: TEIID-5773
> URL: https://issues.jboss.org/browse/TEIID-5773
> Project: Teiid
> Issue Type: Sub-task
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.3
>
>
> The docs suggest that generated_key should be called in a procedure. However calling outside of a procedure will currently return no values as the keys are associated with the executing command context only. Ideally from a connection the user should be able to do:
> insert into ...;
> select generated_key() ...;
> In separate statements and still retrieve the key value.
> The workaround is to use an anonymous procedure block:
> begin
> insert into ...;
> select generated_key() ...;
> end
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the teiid-issues
mailing list