diff --git a/pkg/sql/opt/optbuilder/builder.go b/pkg/sql/opt/optbuilder/builder.go index 483ffcf9c8b8..61f5ec53978f 100644 --- a/pkg/sql/opt/optbuilder/builder.go +++ b/pkg/sql/opt/optbuilder/builder.go @@ -313,6 +313,12 @@ func (b *Builder) buildStmt( switch stmt := stmt.(type) { case *tree.Select: case tree.SelectStatement: + case *tree.Delete: + panic(unimplemented.NewWithIssuef(87289, "%s usage inside a function definition", stmt.StatementTag())) + case *tree.Insert: + panic(unimplemented.NewWithIssuef(87289, "%s usage inside a function definition", stmt.StatementTag())) + case *tree.Update: + panic(unimplemented.NewWithIssuef(87289, "%s usage inside a function definition", stmt.StatementTag())) default: panic(unimplemented.Newf("user-defined functions", "%s usage inside a function definition", stmt.StatementTag())) }