[MDEV-31414] Implement optional lengths for string types Created: 2023-06-06  Updated: 2023-06-27

Status: Open
Project: MariaDB Server
Component/s: Data Definition - Create Table
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Ian Gilfillan Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: sql2023


 Description   

MariaDB currently requires string lengths to be specified, for example:

CREATE TABLE t1 (
    a VARCHAR(10),
    b VARCHAR(20)
);

The 2023 SQL standard no longer requires this, so:

CREATE TABLE t1 (
    a VARCHAR,
    b VARCHAR
);

would be valid code. The limit is then left to the implementation to define, for example in PostgreSQL, characters without lengths become character(1), while character varying without lengths accept strings of any size.


Generated at Thu Feb 08 10:23:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.