I wrote:
> The test that checkSeek() is using is to see whether this works:
> fseeko(fp, 0, SEEK_CUR)
> and apparently on this platform that's a no-op even on an otherwise
> unseekable file.
BTW, I looked in the archives for related discussions and found only the
thread in which the current fseek-checking code was designed. There
were a couple of mentions that SEEK_CUR should be changed to SEEK_SET, eg
http://archives.postgresql.org/pgsql-hackers/2002-10/msg01088.php
but it was apparently focused around coping with specific seek APIs
that didn't have SEEK_CUR at all. We ended up not using those so the
change was never made. The thought that a no-op seek might not give
the right answer wasn't discussed AFAICT.
regards, tom lane