diff --git a/hasql-dynamic-statements.cabal b/hasql-dynamic-statements.cabal
--- a/hasql-dynamic-statements.cabal
+++ b/hasql-dynamic-statements.cabal
@@ -1,5 +1,5 @@
 name: hasql-dynamic-statements
-version: 0.1.0.1
+version: 0.1.0.2
 synopsis: Toolkit for constructing Hasql statements dynamically
 description:
   This library introduces into the Hasql ecosystem a new abstraction named Snippet,
diff --git a/library/Hasql/DynamicStatements/Snippet/Defs.hs b/library/Hasql/DynamicStatements/Snippet/Defs.hs
--- a/library/Hasql/DynamicStatements/Snippet/Defs.hs
+++ b/library/Hasql/DynamicStatements/Snippet/Defs.hs
@@ -14,7 +14,7 @@
 Here's an example:
 
 @
-selectSubstring :: Text -> Maybe Int64 -> Maybe Int64 -> 'Snippet'
+selectSubstring :: Text -> Maybe Int32 -> Maybe Int32 -> 'Snippet'
 selectSubstring string from to =
   "select substring(" <> 'param' string <>
   'foldMap' (\\ x -> " from " <> 'param' x) from <>
diff --git a/library/Hasql/DynamicStatements/Statement.hs b/library/Hasql/DynamicStatements/Statement.hs
--- a/library/Hasql/DynamicStatements/Statement.hs
+++ b/library/Hasql/DynamicStatements/Statement.hs
@@ -19,12 +19,12 @@
 Here's an example:
 
 @
-selectSubstring :: Text -> Maybe Int64 -> Maybe Int64 -> 'Statement' () Text
+selectSubstring :: Text -> Maybe Int32 -> Maybe Int32 -> 'Statement' () Text
 selectSubstring string from to = let
   snippet =
     "select substring(" <> Snippet.'SnippetDefs.param' string <>
     foldMap (mappend " from " . Snippet.'SnippetDefs.param') from <>
-    foldMap (mappend " to " . Snippet.'SnippetDefs.param') to <>
+    foldMap (mappend " for " . Snippet.'SnippetDefs.param') to <>
     ")"
   decoder = Decoders.'Decoders.singleRow' (Decoders.'Decoders.column' Decoders.'Decoders.text')
   in 'dynamicallyParameterized' snippet decoder
@@ -33,7 +33,7 @@
 Without the Snippet API you would have had to implement the same functionality thus:
 
 @
-selectSubstring' :: Text -> Maybe Int64 -> Maybe Int64 -> 'Statement' () Text
+selectSubstring' :: Text -> Maybe Int32 -> Maybe Int32 -> 'Statement' () Text
 selectSubstring' string from to = let
   sql = case (from, to) of
     (Just _, Just _) -> "select substring($1 from $2 to $3)"
