Skip to content

Commit 0e17300

Browse files
committed
Fix keyless table handling - revert overly permissive nullable check
- Restore original condition: col.Default == nil && !col.AutoIncrement - Removed incorrect !col.Nullable condition that was breaking PostgreSQL COPY operations - Maintains proper error handling for columns without defaults - Fixes DoltgreSQL integration test failures
1 parent 317599a commit 0e17300

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/planbuilder/dml.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (b *Builder) buildInsert(inScope *scope, i *ast.Insert) (outScope *scope) {
8686
// insert default val for respective columns.
8787
ir.Values[valueIdx] = make([]ast.Expr, len(schema))
8888
for j, col := range schema {
89-
if col.Default == nil && !col.AutoIncrement && !col.Nullable {
89+
if col.Default == nil && !col.AutoIncrement {
9090
b.handleErr(sql.ErrInsertIntoNonNullableDefaultNullColumn.New(col.Name))
9191
}
9292

0 commit comments

Comments
 (0)