Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-12658

Make the third parameter to LPAD and RPAD optional

    XMLWordPrintable

Details

    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.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.