pgsql@mohawksoft.com writes:
>> The POSIX spec requires open() to assign fd's consecutively from zero.
>> http://www.opengroup.org/onlinepubs/007908799/xsh/open.html
> With all due respect, PostgreSQL now runs natively on Win32.
... using the POSIX APIs that Microsoft so kindly provides.
fd.c will certainly not work at all on a platform that doesn't
provide a POSIX-like file access API, and in the absence of any
evidence to the contrary, I don't see why we shouldn't assume
that the platform adheres to that part of the spec too.
regards, tom lane