New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lpad and rpad with two columns not working [CORE1346] #1765
Comments
Commented by: @asfernandes Unfortunatelly, this is as designed! When you use two LPAD, another FB limit is reached. |
Commented by: Robert Lakis (rlakis) this example is working: select lpad('123', 8, '0') || ' string ' || lpad('1240', 8, '0') col from rdb$database |
Commented by: @asfernandes In theory, we can know the size, when it's constant. Workaround is to cast the result to a varchar of know size: |
Commented by: @dyemanov Adriano, should we consider SUBSTRING as also violating the layering? :-) |
Commented by: @asfernandes Here is what I've replied to Claudio: > Hello, I read your explanation here > However, I don't remember any technical But the problem with PAD is that it can return strings with greater length than the original one, different from SUBSTRING. |
Modified by: @asfernandessummary: lpad with two columns not working => lpad and rpad with two columns not working |
Modified by: @asfernandes |
Modified by: @pcisarWorkflow: jira [ 12511 ] => Firebird [ 15217 ] |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 RC1 [ 10300 ] assignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @asfernandes Backported to 2.1.4. |
Modified by: @asfernandesVersion: 2.1.2 [ 10270 ] Version: 2.1.1 [ 10223 ] Version: 2.1.0 [ 10041 ] Version: 2.1.3 [ 10302 ] Fix Version: 2.1.4 [ 10361 ] |
Modified by: @asfernandes |
Commented by: @pcisar QA test added. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovQA Status: No test => Done successfully |
Submitted by: Robert Lakis (rlakis)
Is duplicated by CORE2597
Is related to QA242
Is duplicated by CORE1360
Check this:
select lpad('xxx', 8, '0') one, lpad('yyy', 8, '0') two from rdb$database
gives:
can't format message 13:796 -- message system code -4.
Dynamic SQL Error.
SQL error code = -204.
Implementation limit exceeded.
block size exceeds implementation restriction.
Commits: d2ec0ea 3915bcf
The text was updated successfully, but these errors were encountered: