Re: [sqlalchemy] why does sqlalchemy UUID succeed with mysql BINARY(16) but fails with postgres BYTEA

2023-10-11 Thread Mike Bayer
PostgreSQL has a native UUID datatype, so when you use SQLAlchemy's UUID, it maps to a real PG UUID datatype, not BYTEA. as for sqlalchemy_utils.UUIDType, we dont maintain that package here so you'd need to look at their source code. Overall if you want complete "UUID mapped to any arbitrary

[sqlalchemy] why does sqlalchemy UUID succeed with mysql BINARY(16) but fails with postgres BYTEA

2023-10-10 Thread Sam S
I noticed that mysql's BINARY(16) datatype can get read into sqlalchemy's UUID() no problem, but if it is postgres' BYTEA datatype, then it fails. I created a reproducible example at this gist: https://gist.github.com/sss-ng/1283c85d1010264132985156c148439b If someone could help me, I would