persistent-postgresql 1.3.1.1 → 1.3.1.2
raw patch · 2 files changed
+18/−4 lines, 2 files
Files
Database/Persist/Postgresql.hs view
@@ -299,7 +299,12 @@ , (k PS.uuid, convertPV (PersistDbSpecific . unUnknown)) , (k PS.json, convertPV (PersistByteString . unUnknown)) , (k PS.unknown, convertPV (PersistByteString . unUnknown))+ -- add Inet and Cidr types+ , (k PS.inet, convertPV (PersistDbSpecific . unUnknown))+ , (k PS.cidr, convertPV (PersistDbSpecific . unUnknown))+ + -- array types: same order as above , (1000, listOf PersistBool) , (1001, listOf (PersistByteString . unBinary))@@ -553,14 +558,23 @@ { cName = cname , cNull = y == "YES" , cSqlType = t- , cDefault = fmap- (\xx -> fromMaybe xx $ T.stripSuffix "::character varying" xx)- d''+ , cDefault = fmap stripSuffixes d'' , cDefaultConstraintName = Nothing , cMaxLen = Nothing , cReference = ref } where+ stripSuffixes t =+ loop'+ [ "::character varying"+ , "::text"+ ]+ where+ loop' [] = t+ loop' (p:ps) =+ case T.stripSuffix p t of+ Nothing -> loop' ps+ Just t' -> t' getRef cname = do let sql = T.concat [ "SELECT COUNT(*) FROM "
persistent-postgresql.cabal view
@@ -1,5 +1,5 @@ name: persistent-postgresql-version: 1.3.1.1+version: 1.3.1.2 license: MIT license-file: LICENSE author: Felipe Lessa, Michael Snoyman <michael@snoyman.com>