oops I noticed I forgot the having clause:
> SELECT id
> FROM Dummy
> GROUP BY name, fkey_id
Having count(*) > 1;
> SELECT A.*
> FROM ( SELECT ID
> FROM Dummy
> GROUP BY name, fkey_id HAVING count(*) > 1 ) AS A
> INNER JOIN Dummy AS D
> ON A.id - 1 = D.id
> OR A.id + 1 = D.id;
--
Regards,
Richard Broersma Jr.
Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug