From: | Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com> |
---|---|
To: | Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #17288: PSQL bug with COPY command (Windows) |
Date: | 2021-11-19 09:25:14 |
Message-ID: | CAC+AXB1C1C_z3XQR=ZxiG+V0U9RDJFtJJamvYMoq+d4RoVRh4A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Nov 19, 2021 at 9:47 AM Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru> wrote:
> >I still think that we should not call GetFileInformationByHandle()
> >when it comes to an argument that we know will fail, ...
>
> Our program calls function freopen() (this function is used in file
> src\backend\utils\error\elog.c). So we don't know exactly that
> GetFileInformationByHandle() will fails for stdin/stdout/stderr.
>
> Ior illustration, I attached small example (test.c) for this case:
> 1) GetFileInformationByHandle() for "stdout" works without error;
> 2) file "1.txt" after running test contains:
>
> Sample string
> attributes = 0x2020, file size = 15
>
> We can check for redirection without calling GetFileInformationByHandle(),
please consider the attached patch.
Regards,
Juan José Santamaría Flecha
Attachment | Content-Type | Size |
---|---|---|
v4_0001-Fixed-Windows-stat-emulation-working-with-streams.patch | application/octet-stream | 811 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2021-11-19 10:01:16 | BUG #17292: view definition containing multiple joins on partitioned table returns invalid explain plan |
Previous Message | Thomas Munro | 2021-11-19 09:07:42 | Re: conchuela timeouts since 2021-10-09 system upgrade |