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
The postgresql backend generates UUID strings without a type. Most of the time PostgreSQL is clever enough to infer the type, but when used in values_, it only infers locally, leading to missing cast errors down the line. This can be fixed by always appending ::uuid to UUIDs.
I haven't made a PR because I don't know where/how this should be changed. beam-postgres seems to borrow a lot of value syntax from postgresql-simple, which I'm not familiar with.
For my own application, I was able to change the syntax in my UUID newtype.
instanceHasSqlValueSyntaxPgValueSyntax (Ida) where
sqlValueSyntax (Id uuid) =PgValueSyntax$ fromPgValue (sqlValueSyntax uuid) <> emit "::uuid"
The text was updated successfully, but these errors were encountered:
The postgresql backend generates UUID strings without a type. Most of the time PostgreSQL is clever enough to infer the type, but when used in
values_
, it only infers locally, leading to missing cast errors down the line. This can be fixed by always appending::uuid
to UUIDs.I haven't made a PR because I don't know where/how this should be changed.
beam-postgres
seems to borrow a lot of value syntax frompostgresql-simple
, which I'm not familiar with.For my own application, I was able to change the syntax in my UUID newtype.
The text was updated successfully, but these errors were encountered: