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

Provide a way to add/remove/modify enum items without specifying existing items

    XMLWordPrintable

Details

    Description

      It would be great if MariaDB SQL allowed for adding and ideally also removing/modifying individual enum items without having to specify all the existing items in the enum.

      The syntax may be like this:

      ALTER TABLE dog
      MODIFY size ENUM ADD VALUE 'large';

      ALTER TABLE dog
      MODIFY size ENUM RENAME VALUE 'large', 'very big';

      ALTER TABLE dog
      MODIFY size ENUM DROP VALUE 'very big';

      or something similar. We can borrow some syntax from PostgreSQL which has "enum types":

      https://www.postgresql.org/docs/16/sql-createtype.html
      https://www.postgresql.org/docs/16/sql-altertype.html

      but adding CREATE/ATER TYPE is a more complex task.

      Attachments

        Activity

          People

            ralf.gebhardt Ralf Gebhardt
            valerii Valerii Kravchuk
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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