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
{{ message }}
Repository navigation
DataType enum: reads raise ValueError on five documented wire type IDs #829
Converter.get() resolves DataType(type_) before it can fall back to the default converter, so any column type identifier the enum doesn't list raises instead of passing the value through. Five documented IDs are missing:
17 INTERVAL
18 ROW
28 FLOAT_VECTOR
29 UUID
30 REGTYPE.
Impact
FLOAT_VECTOR is the sharp edge. Critically, users who never touch converters still hit this, setting cursor.time_zone implicitly constructs a Converter, so a timezone-aware cursor breaks on a vector column. A plain cursor is unaffected, which makes it look config-dependent to users.
Reproduction
Verified against a live CrateDB 6.4.3. I derived all five IDs from the server rather than trusting the docs table:
ID
Type
Statement
Wire value
17
INTERVAL
SELECT INTERVAL '1 day'
"1 day 00:00:00"
18
ROW
SELECT pg_get_keywords() LIMIT 1
["over","U","unreserved"]
28
FLOAT_VECTOR
SELECT embedding FROM t
[0.1, 0.2]
29
UUID
SELECT '…'::uuid
"a5b3c1e0-…"
30
REGTYPE
SELECT 23::regtype
"int4"
All five fail on both the explicit-converter path and the time_zone=-only path. The plain-cursor control returns them fine.
Root cause
DataType(type_) is constructed to be used as a dict key, so an unlisted ID raises before self._default is reachable.
Activity