pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dmitry Koval <d.koval@postgrespro.ru>
To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17288: PSQL bug with COPY command (Windows)
Date: Thu, 18 Nov 2021 21:48:55 +0300
Message-ID: <fe1cde9e-1e52-4f24-3ff7-d01f28a63790@postgrespro.ru> (raw)
In-Reply-To: <CAC+AXB3BKByL8O39qARu3XYMWmrNqMWhcHZZ_2ygqvrK-W6O1g@mail.gmail.com>
References: <17288-6b58a91025a8a8a3@postgresql.org>
	<b95273fb-a51a-d0a9-e4a8-501e32e204e5@postgrespro.ru>
	<YZYDZwDtw/Ioojb4@paquier.xyz>
	<9e4efe29-0ff9-0808-fe32-d1d50e0be4fa@postgrespro.ru>
	<CAC+AXB3BKByL8O39qARu3XYMWmrNqMWhcHZZ_2ygqvrK-W6O1g@mail.gmail.com>

 >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.





view thread (29+ messages)  latest in thread

Message-ID: <fe1cde9e-1e52-4f24-3ff7-d01f28a63790@postgrespro.ru>
Permalink:  ../fe1cde9e-1e52-4f24-3ff7-d01f28a63790@postgrespro.ru/
Also on:    postgresql.org/message-id/fe1cde9e-1e52-4f24-3ff7-d01f28a63790@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: d.koval@postgrespro.ru, juanjo.santamaria@gmail.com, michael@paquier.xyz, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17288: PSQL bug with COPY command (Windows)
  In-Reply-To: <fe1cde9e-1e52-4f24-3ff7-d01f28a63790@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox