Skip to content

Commit

Permalink
fix missing return and revert change on oid
Browse files Browse the repository at this point in the history
  • Loading branch information
dentiny committed Dec 5, 2024
1 parent 4537341 commit 677e521
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/columnstore_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ void columnstore_relation_set_new_filenode(Relation rel, const RelFileNode *newr
if (HeapTupleIsValid(tp)) {
ReleaseSysCache(tp);
duckdb::Columnstore::TruncateTable(rel->rd_id);
return;
}

TupleDesc desc = RelationGetDescr(rel);
Expand All @@ -173,14 +174,14 @@ void columnstore_relation_set_new_filenode(Relation rel, const RelFileNode *newr
auto duck_type = pgduckdb::ConvertPostgresToDuckColumnType(attr);
if (duck_type.id() == duckdb::LogicalTypeId::USER) {
const auto type_info = duck_type.ToString();
elog(ERROR, "column \"%s\" has unsupported user type: %s", NameStr(attr->attname), type_info.data());
elog(ERROR, "column \"%s\" has unsupported user type", NameStr(attr->attname));
}
if (attr->attgenerated) {
elog(ERROR, "unsupported generated column \"%s\"", NameStr(attr->attname));
}

// Check numeric types, which have different support for duckdb and postgres.
ValidateTableCreationColumnType(attr);
ValidateColumnNumericType(attr);
}

duckdb::Columnstore::CreateTable(rel->rd_id);
Expand Down

0 comments on commit 677e521

Please sign in to comment.