You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
edgedb> create scalar type x extending str { create constraint expression on (__subject__ not like 'a%') };
OK: CREATE SCALAR TYPE
edgedb> select <x>to_json('"a"');
["a"]
edgedb> select <x><str>to_json('"a"');
edgedb error: ConstraintViolationError: invalid x
Detail: invalid scalar type 'default::x'
select <x>to_json('"a"') ought to raise an error also.
(I don't think this is specific to json, of course.)
I think the issue is that we are only ever casting to text. We never emit a cast to the real target type.
The text was updated successfully, but these errors were encountered:
We've had a codepath to fix this bug for enum already, but now I extended it to anything that:
* is a scalar,
* it not the top-most concrete base of itself,
Closes#5616
We've had a codepath to fix this bug for enum already, but now I extended it to anything that:
* is a scalar,
* it not the top-most concrete base of itself,
Closes#5616
select <x>to_json('"a"')
ought to raise an error also.(I don't think this is specific to json, of course.)
I think the issue is that we are only ever casting to
text
. We never emit a cast to the real target type.The text was updated successfully, but these errors were encountered: