It's commonly said that pinhole cameras are equally "sharp" over all distances, but it's easy to show geometically that they lose sharpness as the subject gets "close" to the pinhole. This is not a matter of refraction (not present in the absence of a lens) or diffraction (which is a function of hole size, light wavelength, and projection distance, independent of subject distance), but simple geometry; the diverging light rays from a close object will produce a larger "spot" at the image plane than the more nearly parallel rays from a "distant" object, and the larger image spots from closer objects will make those objects less sharp, just as the circle of confusion does for objects further from the plane of focus when using a lens.
In practice, depending on the format and focal length, this effect starts to make itself visible inside a distance of anywhere from 3x to 10x the projection distance (incorrectly called focal length by most). If you routinely make macro images, it can pay to make the pinhole smaller, and there's a version of the optimum hole size equation around that accounts for hole-to-subject distance as well as hole-to-film -- but if you mostly make images of objects more than a foot or two beyond the pinhole, you can ignore this effect.