Re: pg_dump's checkSeek() seems inadequate

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_dump's checkSeek() seems inadequate
Дата
Msg-id 28889.1277663621@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_dump's checkSeek() seems inadequate  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pg_dump's checkSeek() seems inadequate
Следующее
От: David Fetter
Дата:
Сообщение: Re: GSoC - code of implementation of materialized views