diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 0.7.4.0
+
+* Added `distinctOnCorrect` and `distinctOnByCorrect` which will
+  replace `distinctOn` and `distinctOnBy` in a future version.
+
 ## 0.7.3.0
 
 * Added DefaultFromField SqlJson(b) instances for Strict/Lazy
diff --git a/Test/Test.hs b/Test/Test.hs
--- a/Test/Test.hs
+++ b/Test/Test.hs
@@ -432,33 +432,46 @@
 
 testDistinctOn :: Test
 testDistinctOn = do
-    it "distinct on (col1)" $ \conn -> do
+    let distinctOn p q = \conn -> do
+          let expected = L.nubBy (F.on (==) p) $ L.sortOn p table1data
+          testH q (\r -> L.sort r `shouldBe` L.sort expected) conn
+
+        distinctOnBy proj ord q = \conn -> do
+          let expected = L.nubBy ((==) `F.on` proj) $ L.sortOn (proj &&& ord) triples
+          testH q (\r -> L.sort r `shouldBe` L.sort expected) conn
+
+    it "distinct on ()" $
+        let p = const ()
+            q = O.distinctOnCorrect p table1Q
+        in distinctOn p q
+    it "distinct on (col1)" $
         let p = fst
             q = O.distinctOn p table1Q
-            expected = L.nubBy (F.on (==) p) $ L.sortOn p table1data
-        testH q (\r -> L.sort r `shouldBe` L.sort expected) conn
-    it "distinct on (col1, col2)" $ \conn -> do
+        in distinctOn p q
+    it "distinct on (col1, col2)" $
         let p = fst &&& snd
             q = O.distinctOn p table1Q
-            expected = L.nubBy (F.on (==) p) $ L.sortOn p table1data
-        testH q (\r -> L.sort r `shouldBe` L.sort expected) conn
+        in distinctOn p q
 
     let f1 (x,_,_) = x
         f2 (_,y,_) = y
         f3 (_,_,z) = z
 
-    it "distinct on (col1) order by col2" $ \conn -> do
+    it "distinct on () order by col1" $
+        let proj = const ()
+            ord  = f1
+            q = O.distinctOnByCorrect proj (O.asc ord) $ O.values pgTriples
+        in distinctOnBy proj ord q
+    it "distinct on (col1) order by col2" $
         let proj = f1
             ord  = f2
             q = O.distinctOnBy proj (O.asc ord) $ O.values pgTriples
-            expected = L.nubBy ((==) `F.on` proj) $ L.sortOn (proj &&& ord) triples
-        testH q (\r -> L.sort r `shouldBe` L.sort expected) conn
-    it "distinct on (col1, col2) order by col3" $ \conn -> do
+        in distinctOnBy proj ord q
+    it "distinct on (col1, col2) order by col3" $
         let proj = f1 &&& f2
             ord  = f3
             q = O.distinctOnBy proj (O.asc ord) $ O.values pgTriples
-            expected = L.nubBy ((==) `F.on` proj) $ L.sortOn (proj &&& ord) triples
-        testH q (\r -> L.sort r `shouldBe` L.sort expected) conn
+        in distinctOnBy proj ord q
     it "distinct on (col3) order by col2 desc" $ \conn -> do
         let proj = f3
             ord  = f2
diff --git a/opaleye.cabal b/opaleye.cabal
--- a/opaleye.cabal
+++ b/opaleye.cabal
@@ -1,6 +1,6 @@
 name:            opaleye
 copyright:       Copyright (c) 2014-2018 Purely Agile Limited; 2019-2021 Tom Ellis
-version:         0.7.3.0
+version:         0.7.4.0
 synopsis:        An SQL-generating DSL targeting PostgreSQL
 description:     An SQL-generating DSL targeting PostgreSQL.  Allows
                  Postgres queries to be written within Haskell in a
diff --git a/src/Opaleye/Distinct.hs b/src/Opaleye/Distinct.hs
--- a/src/Opaleye/Distinct.hs
+++ b/src/Opaleye/Distinct.hs
@@ -1,6 +1,8 @@
 {-# LANGUAGE FlexibleContexts #-}
 
 module Opaleye.Distinct (distinct,
+                         distinctOnCorrect,
+                         distinctOnByCorrect,
                          Distinctspec,
                          -- * Explicit versions
                          distinctExplicit,
@@ -12,6 +14,7 @@
 
 import           Opaleye.Select (Select)
 import           Opaleye.Internal.Distinct
+import           Opaleye.Order
 
 import qualified Data.Profunctor.Product.Default as D
 
diff --git a/src/Opaleye/Internal/Order.hs b/src/Opaleye/Internal/Order.hs
--- a/src/Opaleye/Internal/Order.hs
+++ b/src/Opaleye/Internal/Order.hs
@@ -67,14 +67,26 @@
 
 distinctOn :: U.Unpackspec b b -> (a -> b)
            -> (a, PQ.PrimQuery, T.Tag) -> (a, PQ.PrimQuery, T.Tag)
-distinctOn ups proj = distinctOnBy ups proj (Order $ const [])
+distinctOn ups proj = distinctOnBy ups proj M.mempty
 
+distinctOnCorrect :: U.Unpackspec b b -> (a -> b)
+                  -> (a, PQ.PrimQuery, T.Tag) -> (a, PQ.PrimQuery, T.Tag)
+distinctOnCorrect ups proj = distinctOnByCorrect ups proj M.mempty
+
 distinctOnBy :: U.Unpackspec b b -> (a -> b) -> Order a
              -> (a, PQ.PrimQuery, T.Tag) -> (a, PQ.PrimQuery, T.Tag)
 distinctOnBy ups proj ord (cols, pq, t) = (cols, pqOut, t)
     where pqOut = case U.collectPEs ups (proj cols) of
             x:xs -> PQ.DistinctOnOrderBy (Just $ x NL.:| xs) (orderExprs cols ord) pq
             []   -> pq
+
+distinctOnByCorrect :: U.Unpackspec b b -> (a -> b) -> Order a
+             -> (a, PQ.PrimQuery, T.Tag) -> (a, PQ.PrimQuery, T.Tag)
+distinctOnByCorrect ups proj ord (cols, pq, t) = (cols, pqOut, t)
+    where pqOut = case U.collectPEs ups (proj cols) of
+            x:xs -> PQ.DistinctOnOrderBy (Just $ x NL.:| xs) oexprs pq
+            []   -> PQ.Limit (PQ.LimitOp 1) (PQ.DistinctOnOrderBy Nothing oexprs pq)
+          oexprs = orderExprs cols ord
 
 -- | Order the results of a given query exactly, as determined by the given list
 -- of input columns. Note that this list does not have to contain an entry for
diff --git a/src/Opaleye/Join.hs b/src/Opaleye/Join.hs
--- a/src/Opaleye/Join.hs
+++ b/src/Opaleye/Join.hs
@@ -36,7 +36,7 @@
 -- have one then we'd love to hear about it. Please [open a new issue
 -- on the Opaleye
 -- project](http://github.com/tomjaguarpaw/haskell-opaleye/issues/new)
--- and tell us about it.)
+-- and tell us about it.
 --
 -- - Left/right joins which really must not use @LATERAL@: use 'optionalRestrict'
 --
diff --git a/src/Opaleye/Order.hs b/src/Opaleye/Order.hs
--- a/src/Opaleye/Order.hs
+++ b/src/Opaleye/Order.hs
@@ -16,13 +16,16 @@
                      , limit
                      , offset
                      -- * Distinct on
-                     , distinctOn
-                     , distinctOnBy
+                     , distinctOnCorrect
+                     , distinctOnByCorrect
                      -- * Exact ordering
                      , O.exact
                      -- * Other
                      , PGOrd
                      , SqlOrd
+                     -- * Deprecated
+                     , distinctOn
+                     , distinctOnBy
                      ) where
 
 import qualified Data.Profunctor.Product.Default as D
@@ -127,17 +130,23 @@
 --   ordering is guaranteed. Multiple fields may be distinguished by projecting out
 --   tuples of 'Opaleye.Field.Field_'s. Use 'distinctOnBy' to control how the rows
 --   are chosen.
-distinctOn :: D.Default U.Unpackspec b b => (a -> b) -> S.Select a -> S.Select a
-distinctOn proj q = Q.productQueryArr (O.distinctOn D.def proj . Q.runSimpleQueryArr q)
+distinctOnCorrect :: D.Default U.Unpackspec b b
+                  => (a -> b)
+                  -> S.Select a
+                  -> S.Select a
+distinctOnCorrect proj q = Q.productQueryArr (O.distinctOnCorrect D.def proj . Q.runSimpleQueryArr q)
 
 
 -- | Keep the row from each set where the given function returns the same result. The
 --   row is chosen according to which comes first by the supplied ordering. However, no
 --   output ordering is guaranteed. Mutliple fields may be distinguished by projecting
 --   out tuples of 'Opaleye.Field.Field_'s.
-distinctOnBy :: D.Default U.Unpackspec b b => (a -> b) -> O.Order a
-             -> S.Select a -> S.Select a
-distinctOnBy proj ord q = Q.productQueryArr (O.distinctOnBy D.def proj ord . Q.runSimpleQueryArr q)
+distinctOnByCorrect :: D.Default U.Unpackspec b b
+                    => (a -> b)
+                    -> O.Order a
+                    -> S.Select a
+                    -> S.Select a
+distinctOnByCorrect proj ord q = Q.productQueryArr (O.distinctOnByCorrect D.def proj ord . Q.runSimpleQueryArr q)
 
 
 -- * Other
@@ -163,3 +172,18 @@
 instance SqlOrd T.SqlCitext
 instance SqlOrd T.SqlUuid
 instance SqlOrd a => SqlOrd (C.Nullable a)
+
+-- | Use 'distinctOnCorrect' instead.  This version has a bug whereby
+-- it returns the whole query if zero columns are chosen to be
+-- distinct (it should just return the first row).  Will be deprecated
+-- in version 0.8.
+distinctOn :: D.Default U.Unpackspec b b => (a -> b) -> S.Select a -> S.Select a
+distinctOn proj q = Q.productQueryArr (O.distinctOn D.def proj . Q.runSimpleQueryArr q)
+
+-- | Use 'distinctOnByCorrect' instead.  This version has a bug
+-- whereby it returns the whole query if zero columns are chosen to be
+-- distinct (it should just return the first row).  Will be deprecated
+-- in version 0.8.
+distinctOnBy :: D.Default U.Unpackspec b b => (a -> b) -> O.Order a
+             -> S.Select a -> S.Select a
+distinctOnBy proj ord q = Q.productQueryArr (O.distinctOnBy D.def proj ord . Q.runSimpleQueryArr q)
