-
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: disallow star expressions in UDF bodies #90085
Conversation
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.
Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @ajwerner, @chengxiong-ruan, and @mgartner)
pkg/sql/logictest/testdata/logic_test/views
line 50 at r1 (raw file):
statement error pgcode 42703 column \"j\" does not exist CREATE VIEW err AS SELECT a FROM t WHERE a = j
Are these tests related to this change? (They are fine, just wondering...)
6213eaa
to
45880e7
Compare
Previously, rytaft (Rebecca Taft) wrote…
Oops, forgot to mention this in the commit message - fixed. I ran into a confusing error message with views that is now fixed too. |
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.
Reviewed all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @ajwerner and @chengxiong-ruan)
This commit disallows star expressions in UDF bodies (see the release note below). It also fixes an error message returned when trying to create a view that references non-existent columns that incorrectly mentioned star expressions. Fixes cockroachdb#86070 Release note (sql change): Star expressions, e.g., `SELECT * FROM ...` are no longer allowed in statements in user-defined functions. They were allowed in early betas of v22.2 from v22.2.0-beta.1 to v22.2.0-beta.4, but have been disallowed because they do not behave correctly. Issue cockroachdb#90080 tracks re-enabling star expressions in UDFs.
45880e7
to
d0a5b85
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.
LGTM! Thanks for working on this.
TFTRs! bors r+ |
Build succeeded: |
This commit disallows star expressions in UDF bodies (see the release
note below). It also fixes an error message returned when trying to
create a view that references non-existent columns that incorrectly
mentioned star expressions.
Fixes #86070
Release note (sql change): Star expressions, e.g.,
SELECT * FROM ...
are no longer allowed in statements in user-defined functions. They were
allowed in early betas of v22.2 from v22.2.0-beta.1 to v22.2.0-beta.4,
but have been disallowed because they do not behave correctly.
Issue #90080 tracks re-enabling star expressions in UDFs.