Skip to content

sql: disallow cross database type references#49841

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
rohany:no-cross
Jun 8, 2020
Merged

sql: disallow cross database type references#49841
craig[bot] merged 1 commit intocockroachdb:masterfrom
rohany:no-cross

Conversation

@rohany
Copy link
Copy Markdown
Contributor

@rohany rohany commented Jun 3, 2020

Fixes #49809.

This PR disallows using types from other databases in tables. This makes
certain behavior (like DROP TYPE) more predictable in their effects,
as well as unblocking some work for supporting user defined types in
cockroach dump.

Release note (sql change): Referencing types across databases has been
disabled.

@rohany rohany requested review from jordanlewis and otan June 3, 2020 19:06
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@rohany
Copy link
Copy Markdown
Contributor Author

rohany commented Jun 3, 2020

CC @solongordon to start taking a look at UDT stuff.

cc @ajwerner @lucy-zhang if you have any opinions on this/ have different opinions how to accomplish this.

@rohany rohany force-pushed the no-cross branch 2 times, most recently from 74df81d to ad58590 Compare June 4, 2020 14:14
@blathers-crl blathers-crl bot requested a review from otan June 4, 2020 19:33
Copy link
Copy Markdown
Contributor

@otan otan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- one naming suggestion and one comment nit

Fixes cockroachdb#49809.

This PR disallows using types from other databases in tables. This makes
certain behavior (like `DROP TYPE`) more predictable in their effects,
as well as unblocking some work for supporting user defined types in
`cockroach dump`.

Release note (sql change): Referencing types across databases has been
disabled.
@rohany
Copy link
Copy Markdown
Contributor Author

rohany commented Jun 8, 2020

TFTR!

bors r=otan

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jun 8, 2020

Build succeeded

@craig craig bot merged commit a966fd4 into cockroachdb:master Jun 8, 2020
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: consider disabling cross database type references

3 participants