[MDEV-12658] Make the third parameter to LPAD and RPAD optional Created: 2017-05-02  Updated: 2017-11-15  Resolved: 2017-11-15

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Fix Version/s: 10.3.1

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: Compatibility

Issue Links:
Blocks
is blocked by MDEV-12659 Add THD::make_string_literal() Closed

 Description   

Other SQL databases support LPAD and RPAD with two parameter. If the third parameter is omitted, it means padding with space by default.

$ psql
psql (9.4.9)
Type "help" for help.
 
bar=> SELECT LPAD('a',10);
    lpad    
------------
          a
(1 row)

$ sqlplus system/manager
 
SQL*Plus: Release 11.2.0.2.0 Production on Tue May 2 12:39:31 2017
 
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
 
 
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
 
SQL> SELECT LPAD('a',10) FROM DUAL;
 
LPAD('A',1
----------
	 a

Under terms of this task will also make the third parameter optional.


Generated at Thu Feb 08 07:59:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.