Sean Chittenden <[EMAIL PROTECTED]> writes:
> stderr is hooked up to the error logs under Apache, which is the
> normal error reporting mechanism.  I thought about adding a test to
> see if stderr is writable, but given that better than 99% of the time
> it will be, I didn't see the point, esp since the above case regarding
> the permissions, doesn't.

If you are inside a GUI application, it's entirely likely that stderr
is hooked up to /dev/null.  I think Peter's complaint has great force
--- libpq has no business assuming it's okay to write on stderr.  The
entire reason we provided a notice-processor hook is to get away from
that assumption.

>> But it's not an error; we must not fail the connection attempt just
>> because of this.

> Agreed, though one train of thought is that if someone did put a
> .pgpass file in place that isn't readable, it should be known that
> their efforts are being wasted in vein.

Yeah, in fact I've been reconsidering that.  If we fail to stat the
file, we should just return quietly; but if we can stat it but not
open it, it's reasonable to assume there's something wrong that ought
to be fixed.  It's difficult to say that this shouldn't be a hard error
if you accept my suggestion that world readability should be an error.

If we do take that viewpoint then the problem goes away, since we can
just report all the reportable conditions as connection-failure

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?


Reply via email to