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: bad errors from zone constraint parsing #39784

Closed
andreimatei opened this issue Aug 20, 2019 · 1 comment
Closed

sql: bad errors from zone constraint parsing #39784

andreimatei opened this issue Aug 20, 2019 · 1 comment
Assignees
Labels
A-partitioning C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@andreimatei
Copy link
Contributor

Given how bad the syntax for this stuff is, our errors need some love. For example:

alter table t configure zone using constraints='foo';
pq: yaml: unmarshal errors:
  line 1: cannot unmarshal !!str `foo` into map[string]int32
@andreimatei andreimatei added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Aug 20, 2019
@awoods187
Copy link
Contributor

cc @rohany

@craig craig bot closed this as completed in b14a990 Sep 16, 2019
ajwerner pushed a commit to ajwerner/cockroach that referenced this issue Sep 17, 2019
We used to throw a cryptic yaml error when zone config constraints could
not be parsed. Now we return a friendlier error message which specifies
what format was expected.

Fixes cockroachdb#39784

Release justification: Low-risk error messaging improvement

Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-partitioning C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

3 participants