Package function returns the same sequence nextval - parallel query?
I want to share a very weird situation and looking for an explanation. My database is 12.2 EE. A merge-insert statement failed with unique constraint error (col_pk is unique key column)
Merge into table a ... insert (col_pk,..)... values (pkg_call.get_nextval, ..._);
I expected pkg_call.get_nextval to return "new" value for each row inserted but, it returned the same value for all the records inserted.
--- pkg_call ---
create or replace package pkg_call as
function get_nextval (iv_seq_type in varchar2)
return number;
end;
/
create or replace package body pkg_call as
function get_nextval(iv_seq_type in varchar2)