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-19T12:27:34Z
Lists: pgsql-bugs
Attachments
- test2.c (text/plain)
>GetFinalPathNameByHandleA() is slower when there is redirection, when >there is no redirection it's similar or faster than >GetFileInformationByHandle(), and that should be the most common case. I tested 2 cases: 1) "stdout" is not redirected. In this case GetFinalPathNameByHandleA() returns error and GetFileInformationByHandle() returns error. Simple test in attachment. --- Result: GetFileInformationByHandle: 7, GetFinalPathNameByHandleA: 16 2) "stdout" redirected (need to uncomment 2 lines in test). Both function works without error. --- Result (see file "1.txt"): GetFileInformationByHandle: 34, GetFinalPathNameByHandleA: 120 The difference is not very big, but it is. With best regards, Dmitry.
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