The SQL MM predicates st_intersects , st_contains and st_within can be used to test whether two geometries overlap in different ways.

st_intersects means that the 1st and 2nd arguments have at least one shared point, st_contains means that the 2nd argument is fully contained in the 1st argument, st_within means that the 1st argument is fully contained within the 2nd argument.

These functions are extended with a third argument which gives a precision. The precision is a number that specifies a maximum distance between two points such that the points will still be considered to overlap. If both the 1st and 2nd arguments are points, then precision can be interpreted as the maximum distance between them.

These do not require the presence of a geometry index but will use one if one is present and one of the geometry arguments is a column on which there is such an index.