Re: [HACKERS] pg_basebackup --progress output for batch execution
От | Arthur Zakirov |
---|---|
Тема | Re: [HACKERS] pg_basebackup --progress output for batch execution |
Дата | |
Msg-id | 20171110092429.GA5549@zakirov.localdomain обсуждение исходный текст |
Ответ на | Re: [HACKERS] pg_basebackup --progress output for batch execution (Jeff Janes <jeff.janes@gmail.com>) |
Список | pgsql-hackers |
On Thu, Nov 09, 2017 at 03:55:36PM -0800, Jeff Janes wrote: > > I think I agree with Arthur that I'd rather have the decision made by > inspecting whether output is going to a tty, rather than by adding another > command line option. But maybe that is not detected robustly enough across > all platforms and circumstances? > isatty() is used within Postgres code already (for example, pg_upgrade/util.c). However, it seems that on Windows isatty() is deprecated and it is recommended to use _isatty(). Moreover, on Windows itcan give false positive result [1], if I'm not mistaken: > The _isatty function determines whether fd is associated with a character device (a terminal, console, printer, or serialport). 1 - https://msdn.microsoft.com/en-us/library/f4s0ddew(v=vs.140).aspx -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления: