Skip to content
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: add back references for user defined types in expressions #61878

Closed
wants to merge 2 commits into from
Closed

sql: add back references for user defined types in expressions #61878

wants to merge 2 commits into from

Conversation

the-ericwang35
Copy link
Contributor

@the-ericwang35 the-ericwang35 commented Mar 11, 2021

Fixes #59019.

Previously, we tracked back references for user-defined types
when they appear as the type for columns (or used in array
or alias types). However, we did not track them when they
occur inside of expressions or view statements.
This patch addresses this by tracking user-defined types
inside of expressions and view statements.

This is rebased on #61439 since it shares the same
view query walking logic implemented in that PR, which is
why it's massive right now.

Release note: None

Followup to #59864.
Previously, a change was introduced to store sequences
used in DEFAULT expressions to be referenced by their
IDs instead of their names, to allow sequence renaming.
In this patch, we want to do something similar by
rewriting sequence references in views to be
referenced by their IDs. This allows sequences
used in views to be renamed.

Release note (sql change): reference sequences used in views
by their IDs to allow these sequences to be renamed.
Fixes #59019.

Previously, we tracked back references for user-defined types
when they appear as the type for columns (or used in array
or alias types). However, we did not track them when they
occur inside of expressions or view statements.
This patch addresses this by tracking user-defined types
inside of expressions and view statements.

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@the-ericwang35
Copy link
Contributor Author

Closing in favour of #62096

@the-ericwang35 the-ericwang35 deleted the ericwang/udt branch March 16, 2021 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql: user defined type references in expressions are not tracked
2 participants