Re: Fix fseek() detection of unseekable files on WIN32
От
Michael Paquier
Тема
Re: Fix fseek() detection of unseekable files on WIN32
Дата
Msg-id
ZBbv+wfxsAXI4mqc@paquier.xyz
Ответ на
Re: Fix fseek() detection of unseekable files on WIN32 (Juan José Santamaría Flecha)
Список
Дерево обсуждения
Fix fseek() detection of unseekable files on WIN32 Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Fix fseek() detection of unseekable files on WIN32 Michael Paquier <michael@paquier.xyz>
Re: Fix fseek() detection of unseekable files on WIN32 Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Fix fseek() detection of unseekable files on WIN32 Michael Paquier <michael@paquier.xyz>
Re: Fix fseek() detection of unseekable files on WIN32 Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Fix fseek() detection of unseekable files on WIN32 Michael Paquier <michael@paquier.xyz>
Re: Fix fseek() detection of unseekable files on WIN32 Michael Paquier <michael@paquier.xyz>
Re: Fix fseek() detection of unseekable files on WIN32 Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Fix fseek() detection of unseekable files on WIN32 Michael Paquier <michael@paquier.xyz>
Re: Fix fseek() detection of unseekable files on WIN32 Michael Paquier <michael@paquier.xyz>
Re: Fix fseek() detection of unseekable files on WIN32 Michael Paquier <michael@paquier.xyz>
Re: Fix fseek() detection of unseekable files on WIN32 Michael Paquier <michael@paquier.xyz>
On Thu, Mar 16, 2023 at 10:08:44AM +0100, Juan José Santamaría Flecha wrote: > IDK, this is just looking for the good case, anything else we'll fail with > ESPIPE or EINVAL anyway. If we want to get the proper file type we can call > fstat(), which has the full logic. I am not sure, TBH. As presented, the two GetFileType() calls in _pgftello64() and _pgfseeko64() ignore the case where it returns FILE_TYPE_UNKNOWN and GetLastError() has something else than NO_ERROR. The code would return EINVAL for all the errors happening. Perhaps that's fine, though I am wondering if we should report something more exact, based on _dosmaperr(GetLastError())? -- Michael
В списке pgsql-hackers по дате отправления
От: Jeevan Ladhe
Дата: