-
Sub-task
-
Resolution: Done
-
Major
-
None
-
None
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