-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: require enterprise license when creating UDF or SP with PL/pgSQL #115657
Conversation
Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
For some reason I could no longer push to michae2/plpgsqlccl branch after closing #114260, so I created the PR from a branch in my fork. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs a new test in pkg/sql/logictest/testdata/logic_test like https://github.com/cockroachdb/cockroach/blob/master/pkg/sql/logictest/testdata/logic_test/multi_region#L1, which verifies that using PL/pgSQL results in the expected CCL error.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @michae2)
51127a4
to
9fb416e
Compare
Good point, done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on the heavy lifting!
I think that Michael or another responsible party should also take a look before merging (I was just passing through...).
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @michae2 and @yuzefovich)
pkg/sql/logictest/testdata/logic_test/plpgsql_license
line 4 at r2 (raw file):
statement error pgcode XXC01 pq: using PL/pgSQL requires a CCL binary CREATE OR REPLACE FUNCTION f() RETURNS RECORD AS $$
Add another test for CREATE PROCEDURE ... LANGUAGE PLpgSQL
, too.
9fb416e
to
715864d
Compare
This commit introduces an enterprise license check when we attempt to create a function using PL/pgSQL language. Most of the changes in this commit are about moving existing logic tests from `pkg/sql/logictest` path into `pkg/ccl/logictestccl` - some files are moved fully while for a few only the necessary contents are moved. Co-authored by @michae2. Release note: None
715864d
to
742b99b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @michae2 and @rharding6373)
pkg/sql/logictest/testdata/logic_test/plpgsql_license
line 4 at r2 (raw file):
Previously, rharding6373 (Rachael Harding) wrote…
Add another test for
CREATE PROCEDURE ... LANGUAGE PLpgSQL
, too.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for picking this up!
Reviewed 50 of 53 files at r1, 2 of 3 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @rharding6373)
TFTRs! bors r+ |
Build succeeded: |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from 742b99b to blathers/backport-release-23.2-115657: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.2.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
blathers backport 23.2 |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from 742b99b to blathers/backport-release-23.2-115657: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.2 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
This commit introduces an enterprise license check when we attempt to create a function using PL/pgSQL language. Most of the changes in this commit are about moving existing logic tests from
pkg/sql/logictest
path intopkg/ccl/logictestccl
- some files are moved fully while for a few only the necessary contents are moved.Co-authored by @michae2.
Fixes: #114602.
Release note: None