Help with adding a time filter to Postgres query
posted_at should certainly be data type timestamptz, not varchar.
(And id should be int or bigint.)

Assuming timestamptz for posted_at and leaving further performance optimization aside, you could make it work range types and the range overlap operator &amp;&amp;:

SELECT (a.status, b.status) 
FROM   FB_status a 
JOIN   FB_status b ON ST_Dwithin (a.geom, b.geom, 0.01)
WHERE  similarity (a.status, b.status) > 0.5
AND   tstzrange(a.posted_at, a.posted_at + interval '10 min')
   && tstzrange(b.posted_at, b.posted_at + interval '10 min');

One might argue it should really be:

   tstzrange(a.posted_at - interval '5 min', a.posted_at + interval '5 min')
&amp;&amp; tstzrange(b.posted_at - interval '5 min', b.posted_at + interval '5 min')


But the result is the same for a self-join.

In reality, you probably need to optimize performance with nearest-neighbor queries on top of (functional) GiST indexes using LATERAL joins ...

I would consider operating with a spacial or temporal raster (granulation) instead to largely simplify things. Using generate_series() and / or width_bucket().