To ensure consistency of a sharded database, Shardman imposes some restrictions on SQL commands executed.
ALTER TABLE
Limitations
ALTER TABLE is prohibited for
partitions of sharded tables.
All forms of ALTER TABLE are prohibited for
sharded or global tables except these:
ALTER TABLE OWNER is allowed.
For sharded table it also changes the owner of table partitions.
ADD COLUMN and DROP COLUMN
are allowed except adding columns of
serial types.
Adding or dropping table-wide unique constraints and checks is allowed. For global tables dropping primary key constraint or dropping columns, participating in primary key, is forbidden.
SET/DROP NOT NULL
is allowed.
Setting storage options is allowed for global tables.
CREATE TABLE
Limitations
All limitations for ALTER TABLE apply.
A temporary table cannot be created as sharded.
DROP TABLE
LimitationsSharded tables and local tables cannot be dropped in the same statement.
Partitions of a sharded table cannot be dropped.
CREATE INDEX CONCURENTLY
is prohibited for sharded tables.