Forum Stats

  • 3,815,385 Users
  • 2,259,012 Discussions
  • 7,893,063 Comments

Discussions

Bug in plsql version of decompose

User_IVLGF
User_IVLGF Member Posts: 1 Green Ribbon

The pl/sql version of decompose adds seemingly random noise to the end of certain canonically decomposable strings, provided they have sufficient length. This also occurs on oracle live sql, but also in oracle 12c, so probably also in all versions in between. Strangely, the sql version of decompose works fine.


Reproduction script:


with

function plsql_decompose(string in varchar2)

    return varchar2

  is

  begin

    return decompose(string);

  end;

 asian as (select rpad(lpad('분',20+level, '가'), 20+2*level, '가') || '분' string from dual connect by (level <= 20))

select asian.string, decompose(asian.string), plsql_decompose(asian.string) from asian;

Tagged: