Effective duplication of DELETE ... LIMIT in Pg
It's easy with window functions. Say you want to delete the last @N rows when ordered by some_column. You assign a ROW_NUMBER() with a CTE or a derived table and then DELETE:

WITH del AS
  ( SELECT pk,
           ROW_NUMBER() OVER (ORDER BY some_column DESC) AS rn
    FROM theTable
    WHERE &lt;conditions&gt;
  ) 
DELETE FROM theTable
USING del 
WHERE theTable.pk = del.pk         --- the PRIMARY KEY of the table
  AND del.rn &lt;= @N ;               --- your parameter here


or without the USING, in a more standard way:

WITH del AS
  ( SELECT pk,
           ROW_NUMBER() OVER (ORDER BY some_column DESC) AS rn
    FROM theTable
    WHERE &lt;conditions&gt;
  ) 
DELETE FROM theTable
WHERE pk IN 
      ( SELECT pk FROM del WHERE rn &lt;= @N ) ;    


Test at SQLFiddle.com