> My copy of APUE says on page 49: "The file descriptor returned by open > is the lowest numbered unused descriptor. This is used by some > applications to open a new file on standard input, standard output, or > standard error."
Yes, I'll restate my questions: What is meant by "unused?" Is it read to mean that a higher number file is *never* returned if there is a lower number that has been used and is now available? Is that something we can 100% absolutely depend on. On All curent and future platforms? It is a stupid idea to truncate the upper bytes of an integer without good reason. I can see LOTS of reasons why this will break something in the future. The upper bits may be used to identify storage media or characteristics. My point is that the spec calls for an "int," PostgreSQL should use an int. > > Unless someone can show there's an actual problem this discussion seems > quite pointless. > The point is that this *is* silly, but I am at a loss to understand why it isn't a no-brainer to change. Why is there a fight over a trivial change which will ensure that PostgreSQL aligns to the documented behavior of "open()" ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend