File tree Expand file tree Collapse file tree
src/Database/PostgreSQL/PQTypes/Model Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ indexNameWith mask tname TableIndex {..} =
218218 , maybe " " ((" __" <> ) . hashWhere) idxWhere
219219 ]
220220 where
221+ asText f = flip rawSQL () . f . unRawSQL
221222 (colMask, incMask) = splitAt (length idxColumns) (mask ++ repeat False )
222223 renderIdent quoted ident =
223224 flip rawSQL () . sanitize $
@@ -235,13 +236,12 @@ indexNameWith mask tname TableIndex {..} =
235236 -- hash WHERE clause and add it to index name so that indexes
236237 -- with the same columns, but different constraints can coexist
237238 hashWhere =
238- flip rawSQL ()
239- . T. decodeUtf8
240- . B16. encode
241- . BS. take 10
242- . RIPEMD160. hash
243- . T. encodeUtf8
244- . unRawSQL
239+ asText $
240+ T. decodeUtf8
241+ . B16. encode
242+ . BS. take 10
243+ . RIPEMD160. hash
244+ . T. encodeUtf8
245245
246246-- | Create an index. Warning: if the affected table is large, this will prevent
247247-- the table from being modified during the creation. If this is not acceptable,
You can’t perform that action at this time.
0 commit comments