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-18T18:48:55Z
Lists: pgsql-bugs
>You are right about freopen(), but stderr works just because it's being >parsed as a file, not a stream, by parse_slash_copy(). You are right. I wrote about stderr without inspecting code ( >I would keep the memset(buf, 0, sizeof(*buf)) for the members we >are not setting. Of course. Original code (src/port/win32stat.c) contains line memset(buf, 0, sizeof(*buf)) before 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