IDEMPIERE-730 03_update_sequences.sql for native sequence / improve performance
This commit is contained in:
parent
23e6325afc
commit
a9fb26e58d
|
|
@ -111,13 +111,16 @@ BEGIN
|
||||||
|| ' where name='''
|
|| ' where name='''
|
||||||
|| r.tablename
|
|| r.tablename
|
||||||
|| ''' and istableid=''Y''';
|
|| ''' and istableid=''Y''';
|
||||||
|
|
||||||
EXECUTE cmdupd;
|
EXECUTE cmdupd;
|
||||||
END IF;
|
END IF;
|
||||||
IF currentseq < currentnext AND isnativeseqon ='Y' THEN
|
IF currentseq < currentnext AND isnativeseqon ='Y' THEN
|
||||||
WHILE NOT currentseq >= (currentnext-1) LOOP
|
cmdupd :=
|
||||||
EXECUTE 'SELECT nextval('''||trim(r.tablename)||'_sq'''||')' INTO currentseq;
|
'SELECT setval('''
|
||||||
END LOOP;
|
|| trim(r.tablename)
|
||||||
|
|| '_sq'','
|
||||||
|
|| currentnext
|
||||||
|
|| ')';
|
||||||
|
EXECUTE cmdupd;
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
END LOOP;
|
END LOOP;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue