[YSQL] SPLIT INTO not inherited on constraints within the CREATE TABLE statement #23483
Open
Description
Jira Link: DB-12400
Description
With Postgres CREATE TABLE syntax, it is possible to add additional constraints directly inside the create table syntax:
create table test_split_tbl2
(
id uuid default uuid_generate_v4(),
metadata jsonb not null default '{}',
updated_by varchar(40) not null default current_user,
updated_at timestamptz not null default current_timestamp,
primary key (id HASH, updated_at DESC),
unique (id)
) split into 12 tablets;
In this case, I added a UNIQUE constraint. The resulting index does not use the supplied (and suggested) SPLIT INTO and instead results in the default (3) number of tablets.
For indexes created within the create table () statement, it seems appropriate to apply the SPLIT INTO consistently to all resulting split-able objects of the statement.
Issue Type
kind/enhancement
Warning: Please confirm that this issue does not contain any sensitive information
- I confirm this issue does not contain any sensitive information.