Re: Does this look like a bug to you guys?
From: Sayan Malakshinov <xt.and.r_at_gmail.com>
Date: Wed, 16 Mar 2016 06:04:16 +0300
Message-ID: <CAOVevU7O0gB=nSkBSTWtrSb_bNEPAEGNgniUh3jsRuk-OTHwsQ_at_mail.gmail.com>
I've analyzed SYS_OP_TRTB a little bit more, so now we have:
Date: Wed, 16 Mar 2016 06:04:16 +0300
Message-ID: <CAOVevU7O0gB=nSkBSTWtrSb_bNEPAEGNgniUh3jsRuk-OTHwsQ_at_mail.gmail.com>
I've analyzed SYS_OP_TRTB a little bit more, so now we have:
SYS_OP_TRTB(A,B,C,D) is a special trimming/padding function, where
A - the value for trimming/padding, C - bytes, D - characters. B - this arguments accepts only literals:when 1st bit is set to 1 (bitand(B,1)=1), this function adds spaces (chr(32)) to right up to least(C bytes, B chars), if length of the first argument is less than C bytes or B chars. when 4th bit is set to 0 (bitand(B,8)=0), this functions raises ORA-01401, if length of the first argument is less than C bytes or B chars. I still don't know what's for 2nd and 3rd bits...
My tests:
http://orasql.org/scripts/char/test.sql
http://orasql.org/scripts/char/test2.sql
-- Best regards, Sayan Malakshinov Oracle performance tuning engineer Oracle ACE Associate http://orasql.org -- http://www.freelists.org/webpage/oracle-lReceived on Wed Mar 16 2016 - 04:04:16 CET