diff --git a/Database/Persist/Instances/IP.hs b/Database/Persist/Instances/IP.hs
--- a/Database/Persist/Instances/IP.hs
+++ b/Database/Persist/Instances/IP.hs
@@ -23,7 +23,11 @@
     fromPersistValue _ = Left "IP must be converted from PersistDbSpecific"
 
 instance PersistFieldSql IP where
+#ifdef USE_IP4R
+    sqlType _ = SqlOther "IPADDRESS"
+#else
     sqlType _ = SqlOther "INET"
+#endif
 
 instance PersistField IPRange where
     toPersistValue = PersistDbSpecific . pack . show
@@ -32,7 +36,11 @@
     fromPersistValue _ = Left "IPRange must be converted from PersistDbSpecific"
 
 instance PersistFieldSql IPRange where
+#ifdef USE_IP4R
+    sqlType _ = SqlOther "IPRANGE"
+#else
     sqlType _ = SqlOther "CIDR"
+#endif
 
 
 -- The following instances don't really make sense, but persistent
diff --git a/persistent-iproute.cabal b/persistent-iproute.cabal
--- a/persistent-iproute.cabal
+++ b/persistent-iproute.cabal
@@ -1,5 +1,5 @@
 name:                persistent-iproute
-version:             0.2.2
+version:             0.2.3
 synopsis:            Persistent instances for types in iproute
 description:         Persistent instances and operators for types in iproute to use with PostgreSQL.
 license:             BSD3
@@ -11,6 +11,11 @@
 build-type:          Simple
 cabal-version:       >=1.10
 
+flag ip4r
+  description:         "Use ip4r types instead of postgresql defaults.
+                        See https://github.com/RhodiumToad/ip4r for details."
+  default:             False
+
 library
   exposed-modules:     Database.Persist.IP
   other-modules:       Database.Persist.Instances.IP
@@ -24,8 +29,11 @@
                        persistent,
                        text
   default-language:    Haskell2010
-  ghc-options:         -Wall -fno-warn-orphans
+  ghc-options:       -Wall -fno-warn-orphans
+  if flag(ip4r)
+    cpp-options:       -DUSE_IP4R
 
 source-repository head
   type: git
   location: https://github.com/greydot/persistent-iproute.git
+
