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+AXB1C1C_z3XQR=ZxiG+V0U9RDJFtJJamvYMoq+d4RoVRh4A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17288: PSQL bug with COPY command (Windows)  (Dmitry Koval <d.koval@postgrespro.ru>)
Ответы Re: BUG #17288: PSQL bug with COPY command (Windows)  (Dmitry Koval <d.koval@postgrespro.ru>)
Список pgsql-bugs

On Fri, Nov 19, 2021 at 9:47 AM Dmitry Koval <d.koval@postgrespro.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
Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: conchuela timeouts since 2021-10-09 system upgrade
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17292: view definition containing multiple joins on partitioned table returns invalid explain plan