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: Link to deprecation docs when returning ERROR for cross-database references #57782

Closed
vy-ton opened this issue Dec 10, 2020 · 7 comments · Fixed by #59551
Closed

sql: Link to deprecation docs when returning ERROR for cross-database references #57782

vy-ton opened this issue Dec 10, 2020 · 7 comments · Fixed by #59551
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@vy-ton
Copy link
Contributor

vy-ton commented Dec 10, 2020

Received feedback that the below error message for cross databases should link to the Github issue for removal so that users can provide feedback. We can also link to deprecation docs

ERROR: the view cannot refer to other databases; (see the 'sql.cross_db_views.enabled' cluster setting)
@vy-ton
Copy link
Contributor Author

vy-ton commented Dec 10, 2020

@ericharmeling for input on the error message wording

@ericharmeling
Copy link
Contributor

In the case of views, I'd make the text read something like:

ERROR: views cannot refer to objects in other databases. By default, cross-database references are disabled for views with the sql.cross_db_views.enabled cluster setting.
Note that cross-database references will be deprecated in a future release. For details, see https://www.cockroachlabs.com/docs/releases/v20.2.0.html#deprecations.

The first two sentences of the message depend on the referencing object, but the two sentences after the newline should be the same for FKs, sequences, and UDTs. We link to the tracking issue from the doc, so I'm not sure we need both URLs.

@vy-ton
Copy link
Contributor Author

vy-ton commented Jan 9, 2021

@ericharmeling Thoughts on Note that cross-database references will be removed in a future release since the current status is already deprecation?

@rafiss rafiss added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Jan 12, 2021
@rafiss rafiss changed the title sql: Link to Github issue when returning ERROR for cross-database references sql: Link to deprecation docs when returning ERROR for cross-database references Jan 19, 2021
@ericharmeling
Copy link
Contributor

@ericharmeling Thoughts on Note that cross-database references will be removed in a future release since the current status is already deprecation?

Sorry for the late response. Are cross-database references officially deprecated in v20.2? I can update the docs if yes.

@arulajmani
Copy link
Collaborator

Sorry for the late response. Are cross-database references officially deprecated in v20.2? I can update the docs if yes.

Yeah, they are. Aren't the docs already updated at: https://www.cockroachlabs.com/docs/releases/v20.2.0.html#deprecations?

@ericharmeling
Copy link
Contributor

Sorry for the late response. Are cross-database references officially deprecated in v20.2? I can update the docs if yes.

Yeah, they are. Aren't the docs already updated at: https://www.cockroachlabs.com/docs/releases/v20.2.0.html#deprecations?

Yes. I just updated this page.

@ericharmeling
Copy link
Contributor

cockroachdb/docs#9492

craig bot pushed a commit that referenced this issue Jan 29, 2021
59551: sql: add link to deprecation docs for cross db references in the error r=otan a=arulajmani

Closes #57782

Release note (sql change): error messages for cross-database links now
include a hint directing to the user to the deprecation docs. An
example message looks like:
```
ERROR: the view cannot refer to other databases; (see the 'sql.cross_db_views.enabled' cluster setting)
SQLSTATE: 0A000
HINT: Note that cross database references will be removed in future releases. See: https://www.cockroachlabs.com/docs/releases/v21.1.0.html#deprecations
```

Co-authored-by: arulajmani <[email protected]>
craig bot pushed a commit that referenced this issue Jan 31, 2021
59551: sql: add link to deprecation docs for cross db references in the error r=otan a=arulajmani

Closes #57782

Release note (sql change): error messages for cross-database links now
include a hint directing to the user to the deprecation docs. An
example message looks like:
```
ERROR: the view cannot refer to other databases; (see the 'sql.cross_db_views.enabled' cluster setting)
SQLSTATE: 0A000
HINT: Note that cross database references will be removed in future releases. See: https://www.cockroachlabs.com/docs/releases/v21.1.0.html#deprecations
```

Co-authored-by: arulajmani <[email protected]>
@craig craig bot closed this as completed in 03798d0 Jan 31, 2021
arulajmani added a commit to arulajmani/cockroach that referenced this issue Feb 8, 2021
Closes cockroachdb#57782

Release note (sql change): error messages for cross-database links now
include a hint directing to the user to the deprecation docs. An
example message looks like:

```
ERROR: the view cannot refer to other databases; (see the 'sql.cross_db_views.enabled' cluster setting)
SQLSTATE: 0A000
HINT: Note that cross database references will be removed in future releases. See: https://www.cockroachlabs.com/docs/releases/v21.1.0.html#deprecations
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants