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
In MySQL, ENUMs are supported with a numeric backed index and you can do something like this:
CREATETYPEpriorityAS ENUM ('Low', 'Medium', 'High');
CREATETABLEtickets (
id INTPRIMARY KEY,
title VARCHAR(255) NOT NULL,
priority PRIORITY);
INSERT INTO tickets(id,title, priority) VALUES('2','Upgrade Windows OS for all computers', 1);
In PG this isn't supported but has this nice error message:
ERROR: column "priority" is of type priority but expression is of type integerLINE2: VALUES('2','Upgrade Windows OS for all computers', 1);
^
HINT: You will need to rewrite or cast the expression.
In CRDB the message is:
ERROR: value type int doesn't match type priority of column "priority"
SQLSTATE: 42804
We should add this hint or something similar.
The text was updated successfully, but these errors were encountered:
awoods187
added
the
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
label
Aug 3, 2020
In MySQL, ENUMs are supported with a numeric backed index and you can do something like this:
In PG this isn't supported but has this nice error message:
In CRDB the message is:
We should add this hint or something similar.
The text was updated successfully, but these errors were encountered: