Re: BUG #17288: PSQL bug with COPY command (Windows)

Поиск
Список
Период
Сортировка
От Juan José Santamaría Flecha
Тема Re: BUG #17288: PSQL bug with COPY command (Windows)
Дата
Msg-id CAC+AXB02qGeNP_hNK8mio9GPFbeAAESjVJciLNs6gQo-ykEc_w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17288: PSQL bug with COPY command (Windows)  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: BUG #17288: PSQL bug with COPY command (Windows)  (Dmitry Koval <d.koval@postgrespro.ru>)
Список pgsql-bugs
Thanks for reporting.

On Thu, Nov 18, 2021 at 8:40 AM Michael Paquier <michael@paquier.xyz> wrote:
On Wed, Nov 17, 2021 at 01:29:02PM +0300, Dmitry Koval wrote:
> Attachments: patch + screenshot with error.

I think that we had better never call GetFileInformationByHandle() if
we use a fileno that maps to stdin, stdout or stderr.  The 10000$
question is what to use though.  One option is to let our emulation
code fill in the gap for those three cases with at least st_mode
filled with S_IFIFO, then return 0 as error code :/

When the file descriptor is coming from a stream I don't think we have to use GetFileInformationByHandle() or stat() to get any information, but we can directly return the stat information. Please find attached a patch for so.

Regards,

Juan José Santamaría Flecha
Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Giacomo Colonesi
Дата:
Сообщение: Re: BUG #17289: Postgres 14.1 Windows installer fails with iso-8859-1 error and terminates
Следующее
От: Dmitry Koval
Дата:
Сообщение: Re: BUG #17288: PSQL bug with COPY command (Windows)