Tom Lane wrote:
> Andreas Pflug <pgadmin@pse-consulting.de> writes:
>
>> ereport(LOG,
>> (errcode_for_file_access(),
>>- errmsg("could not read from logger pipe: %m")));
>>+ errmsg("could not read from logger pipe: %lu", error)));
>
>
> Does %m actually give a wrong result here? Because if it does,
> errcode_for_file_access() is wrong too.
Yes, errno is not set. Same issue for CreatePipe; I missed that.
Maybe we should consider examining GetLastError() and FormatMessage()
(the equivalent of strerror, a sample is in the symlink/junction code)
for %m under win32; these will work for standard posix operations also
and might give much more detailed messages in many situations.
Regards,
Andreas