Skip to content

Commit 0a4f851

Browse files
committed
Also consider the "0" case here
1 parent 018d0f6 commit 0a4f851

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/storage/postgres_table_set.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void PostgresTableSet::AddConstraint(PostgresResult &result, idx_t row, Postgres
9898
vector<string> columns;
9999
for (auto &split : splits) {
100100
auto index = std::stoull(split);
101-
if (index > create_info.columns.LogicalColumnCount()) {
101+
if (index <= 0 || index > create_info.columns.LogicalColumnCount()) {
102102
return;
103103
}
104104
columns.push_back(create_info.columns.GetColumn(LogicalIndex(index - 1)).Name());

0 commit comments

Comments
 (0)