Docs: Add missing WHERE to last UPDATE example on MovR Doc

Created on 31 Jul 2020  路  5Comments  路  Source: cockroachdb/docs

Re: MovR

Issue Description

the last example showing the update statement needs a WHERE clause, otherwise it fails with

[email protected]:58842/movr> UPDATE rides SET end_address = '75257 David Valley Suite 98';
ERROR: rejected: UPDATE without WHERE clause (sql_safe_updates = true)
SQLSTATE: 01000

Suggested Resolution

UPDATE rides SET end_address = '75257 David Valley Suite 98' WHERE id = '51672693-c8f3-4cca-9fac-f59619783ec7';
C-doc-improvement O-customer-success T-incorrect-or-unclear-info good-first-issue hacktoberfest

All 5 comments

Would like to take this issue and add copy-paste friendly examples with real values

Would like to take this issue and add copy-paste friendly examples with real values

@irkan-hadi
Thanks for offering your contribution! I think this example just needs an additional WHERE clause.

As @dbist suggests:

UPDATE rides SET end_address = '75257 David Valley Suite 98' WHERE id = '51672693-c8f3-4cca-9fac-f59619783ec7';

@ericharmeling ah yes, but his suggestion is a fully executable statement while the others in the official doc are just skeleton statements (to be filled by the user) so I thought it would look out of place unless some fully executable examples are added as well.

www.cockroachlabs.com/docs/stable/movr.html

@ericharmeling ah yes, but his suggestion is a fully executable statement while the others in the official doc are just skeleton statements (to be filled by the user) so I thought it would look out of place unless some fully executable examples are added as well.

www.cockroachlabs.com/docs/stable/movr.html

Good point! Feel free to open a PR to our docs repo. I'd be happy to review. :)

Fixed by #8520. Thanks @irkan-hadi !

Was this page helpful?
0 / 5 - 0 ratings