Skip to content

Commit

Permalink
optbuilder: remove enterprise check for plgpsql
Browse files Browse the repository at this point in the history
Now that all clusters require a license, we can remove this check. This
simplifies testing setup when using plpgsql, as we no longer need to
add a dependency on the ccl package from tests in other packages.

Release note: None
  • Loading branch information
rafiss committed Nov 22, 2024
1 parent 1eee6b9 commit 3bbeee1
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 97 deletions.
2 changes: 0 additions & 2 deletions pkg/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,6 @@ GO_TARGETS = [
"//pkg/ccl/pgcryptoccl/pgcryptocipherccl:pgcryptocipherccl_test",
"//pkg/ccl/pgcryptoccl:pgcryptoccl",
"//pkg/ccl/pgcryptoccl:pgcryptoccl_test",
"//pkg/ccl/plpgsqlccl:plpgsqlccl",
"//pkg/ccl/revertccl:revertccl",
"//pkg/ccl/revertccl:revertccl_test",
"//pkg/ccl/schemachangerccl:schemachangerccl",
Expand Down Expand Up @@ -2087,7 +2086,6 @@ GO_TARGETS = [
"//pkg/sql/plpgsql/parser/lexbase:lexbase",
"//pkg/sql/plpgsql/parser:parser_test",
"//pkg/sql/plpgsql/parser:plpgparser",
"//pkg/sql/plpgsql:plpgsql",
"//pkg/sql/privilege:privilege",
"//pkg/sql/privilege:privilege_test",
"//pkg/sql/protoreflect/gprototest:gprototest",
Expand Down
1 change: 0 additions & 1 deletion pkg/ccl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ go_library(
"//pkg/ccl/oidcccl",
"//pkg/ccl/partitionccl",
"//pkg/ccl/pgcryptoccl",
"//pkg/ccl/plpgsqlccl",
"//pkg/ccl/securityccl/fipsccl",
"//pkg/ccl/storageccl",
"//pkg/ccl/storageccl/engineccl",
Expand Down
1 change: 0 additions & 1 deletion pkg/ccl/ccl_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
_ "github.com/cockroachdb/cockroach/pkg/ccl/oidcccl"
_ "github.com/cockroachdb/cockroach/pkg/ccl/partitionccl"
_ "github.com/cockroachdb/cockroach/pkg/ccl/pgcryptoccl"
_ "github.com/cockroachdb/cockroach/pkg/ccl/plpgsqlccl"
_ "github.com/cockroachdb/cockroach/pkg/ccl/securityccl/fipsccl"
_ "github.com/cockroachdb/cockroach/pkg/ccl/storageccl"
_ "github.com/cockroachdb/cockroach/pkg/ccl/storageccl/engineccl"
Expand Down
13 changes: 0 additions & 13 deletions pkg/ccl/plpgsqlccl/BUILD.bazel

This file was deleted.

20 changes: 0 additions & 20 deletions pkg/ccl/plpgsqlccl/plpgsql.go

This file was deleted.

15 changes: 0 additions & 15 deletions pkg/sql/logictest/testdata/logic_test/plpgsql_license

This file was deleted.

7 changes: 0 additions & 7 deletions pkg/sql/logictest/tests/local/generated_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pkg/sql/opt/optbuilder/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ go_library(
"//pkg/sql/parser/statements",
"//pkg/sql/pgwire/pgcode",
"//pkg/sql/pgwire/pgerror",
"//pkg/sql/plpgsql",
"//pkg/sql/plpgsql/parser:plpgparser",
"//pkg/sql/privilege",
"//pkg/sql/sem/asof",
Expand Down
6 changes: 0 additions & 6 deletions pkg/sql/opt/optbuilder/create_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/sql/parser"
"github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgcode"
"github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgerror"
"github.com/cockroachdb/cockroach/pkg/sql/plpgsql"
plpgsqlparser "github.com/cockroachdb/cockroach/pkg/sql/plpgsql/parser"
"github.com/cockroachdb/cockroach/pkg/sql/sem/cast"
"github.com/cockroachdb/cockroach/pkg/sql/sem/plpgsqltree"
Expand Down Expand Up @@ -101,11 +100,6 @@ func (b *Builder) buildCreateFunction(cf *tree.CreateRoutine, inScope *scope) (o
if !languageFound {
panic(pgerror.New(pgcode.InvalidFunctionDefinition, "no language specified"))
}
if language == tree.RoutineLangPLpgSQL {
if err := plpgsql.CheckClusterSupportsPLpgSQL(b.evalCtx.Settings); err != nil {
panic(err)
}
}

// Track the dependencies in the arguments, return type, and statements in
// the function body.
Expand Down
13 changes: 0 additions & 13 deletions pkg/sql/plpgsql/BUILD.bazel

This file was deleted.

18 changes: 0 additions & 18 deletions pkg/sql/plpgsql/plpgsql.go

This file was deleted.

0 comments on commit 3bbeee1

Please sign in to comment.