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
With the current behavior it is not possible to encode something like point '(2.0,0)' for PostgreSQL.
(I would also be very surprised if the example given in the docs for PersistDbSpecific is still anywhere close working; but I haven't tried that specifically.)
How to address this?
I'm not sure how to best address this. Altering how PersistDbSpecific is encoded would be a breaking change that isn't detected by the type checker. One solution might be to remove PersistDbSpecific and add two new constructors:
PersistDbSpecificEscape, which uses Escape (current behavior of persistent-postgresql)
PersistDbSpecificPlain, which uses Plain (current behavior of persistent-mysql)
The text was updated successfully, but these errors were encountered:
What is the discrepancy?
persistent-mysql
andpersistent-postgresql
encodePersistDbSpecific
differently.persistent-mysql
usesPlain
:persistent/persistent-mysql/Database/Persist/MySQL.hs
Line 239 in 31e25c4
However,
persistent-postgresql
usesEscape
(effectively, treating it as a string-like value):persistent/persistent-postgresql/Database/Persist/Postgresql.hs
Line 554 in 31e25c4
When was this introduced?
The behavior for PostgreSQL changed with 9287943.
Why is this a problem?
With the current behavior it is not possible to encode something like
point '(2.0,0)'
for PostgreSQL.(I would also be very surprised if the example given in the docs for
PersistDbSpecific
is still anywhere close working; but I haven't tried that specifically.)How to address this?
I'm not sure how to best address this. Altering how
PersistDbSpecific
is encoded would be a breaking change that isn't detected by the type checker. One solution might be to removePersistDbSpecific
and add two new constructors:PersistDbSpecificEscape
, which usesEscape
(current behavior ofpersistent-postgresql
)PersistDbSpecificPlain
, which usesPlain
(current behavior ofpersistent-mysql
)The text was updated successfully, but these errors were encountered: