In one of Bob's articles on Depth of field he states: "This covers the case of a pinhole camera. Such a camera has a very, very large depth of field (almost, but not quite infinite). However none of the image is sharp. The depth of field is large because all the image is equally blurred! "
Is the lack of sharpness in the pinhole image due to diffraction effects?
Diffraction is the limiting factor. You can make diffraction less important by using a larger pinhole - but of course that blurs the image too (since there's no lens in there!).
There's actually an optimal pinhole aperture which is something like:
diameter = 2 * square-root (f * lambda)
where f is the distance from the pinhole to the film/sensor and lambda is the wavelength of light (you can use 0.00055mm for visible light)