Re: BUG #17288: PSQL bug with COPY command (Windows)
Dmitry Koval <d.koval@postgrespro.ru>
From: Dmitry Koval <d.koval@postgrespro.ru>
To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>,
PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2021-11-19T10:45:10Z
Lists: pgsql-bugs
>We can check for redirection without calling >GetFileInformationByHandle(), please consider the attached patch. There are doubts: 1) we always use system function (GetFinalPathNameByHandleA or GetFileInformationByHandle); sometimes we use these two calls GetFinalPathNameByHandleA + GetFileInformationByHandle together (in freopen() case); 2) function GetFinalPathNameByHandleA is slower than GetFileInformationByHandle (2-4 times). Might be exist a cheaper way than GetFinalPathNameByHandleA? I don't understand why this way better than using one call GetFileInformationByHandle... With best regards, Dmitry Koval.
Commits
-
Fix compatibility thinko for fstat() on standard streams in win32stat.c
- 5550a9c38519 14.2 landed
- 58651d8dd6a5 15.0 landed
-
Fix fstat() emulation on Windows with standard streams
- d2198b4593cc 14.2 landed
- 10260c794b21 15.0 landed