Re: BUG #17288: PSQL bug with COPY command (Windows)

Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>

From: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Justin Pryzby <pryzby@telsasoft.com>, Dmitry Koval <d.koval@postgrespro.ru>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2021-11-29T07:53:28Z
Lists: pgsql-bugs
On Mon, Nov 29, 2021 at 7:51 AM Michael Paquier <michael@paquier.xyz> wrote:

>
> We know that GetFileInformationByHandle() would be able to work in
> the scope of win32stat.c as it is supported down to Windows XP so we
> would be covered, so switching to that instead of
> GetFinalPathNameByHandleA() would take care of the problem.  Better to
> call that only for a standard stream, only for the emulation of
> fstat(), in the spirit of the original fix.
>
> Fair enough. Windows XP support is a discussion for another thread.

Regards,

Juan José Santamaría Flecha

Commits

  1. Fix compatibility thinko for fstat() on standard streams in win32stat.c

  2. Fix fstat() emulation on Windows with standard streams