Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ public String createTableDdl(CreateTableJdbcStatement stmt) {
return partitionDdl;
}

// pg_partman owns lifecycle for RANGE+TTL tables — no default partition needed
if (stmt.getPartitionType() == PartitionType.RANGE
&& stmt.getTtl() != null
&& !stmt.getTtl().isZero()) {
return partitionDdl;
}

var allPartitionTableName = quoteIdentifier(stmt.getName() + PARTITION_SUFFIX);
var tableName = quoteIdentifier(stmt.getName());
var partitionDefinition =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ INSERT INTO `default_catalog`.`default_database`.`Orders_2`
{
"name" : "OrderUpdates_1",
"type" : "TABLE",
"sql" : "CREATE TABLE IF NOT EXISTS \"OrderUpdates_1\" (\"id\" BIGINT NOT NULL, \"customerid\" BIGINT NOT NULL, \"time\" TIMESTAMP WITH TIME ZONE NOT NULL, \"entries\" JSONB, PRIMARY KEY (\"id\",\"time\")) PARTITION BY RANGE (\"time\");\n\nCREATE TABLE IF NOT EXISTS \"OrderUpdates_1_all\" PARTITION OF \"OrderUpdates_1\" FOR VALUES FROM (MINVALUE) TO (MAXVALUE)",
"sql" : "CREATE TABLE IF NOT EXISTS \"OrderUpdates_1\" (\"id\" BIGINT NOT NULL, \"customerid\" BIGINT NOT NULL, \"time\" TIMESTAMP WITH TIME ZONE NOT NULL, \"entries\" JSONB, PRIMARY KEY (\"id\",\"time\")) PARTITION BY RANGE (\"time\")",
"fields" : [
{
"name" : "id",
Expand Down
Loading