[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 08:42:00 EDT 2019


Steven Hawkins created TEIID-5773:
-------------------------------------

             Summary: 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
             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