Re: proposal - psql - use pager for \watch command

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal - psql - use pager for \watch command
Date: 2021-03-04 10:28:16
Message-ID: CAFj8pRAkReqHokfEGsZERHaCR8fP6E4UzE5MPeW2PgMqwarXSA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

čt 4. 3. 2021 v 7:37 odesílatel Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
napsal:

> Hi
>
> Here is a little bit updated patch - detection of end of any child process
> cannot be used on WIN32. I am not an expert on this platform, but from what
> I read about it, there is no easy solution. The problem is in _popen
> function. We lost the handle of the created process, and it is not possible
> to find it. Writing a new implementation of _popen function looks like a
> big overkill to me. We can disable this functionality there completely (on
> win32) or we can accept the waiting time after pager has ended until we
> detect pipe error. I hope so this is acceptable, in this moment, because a)
> there are not pspg for windows (and there was only few requests for porting
> there in last 4 years), b) usage of psql on mswin platform is not too wide,
> c) in near future, there will be an possibility to use Unix psql on this
> platform.
>
>
second version - after some thinking, I think the pager for \watch command
should be controlled by option "pager" too. When the pager is disabled on
psql level, then the pager will not be used for \watch too.

Regards

Pavel

> Regards
>
> Pavel
>
>

Attachment Content-Type Size
PSQL_WATCH_PAGER-20200304-2.patch text/x-patch 8.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2021-03-04 10:33:26 Re: [HACKERS] Custom compression methods
Previous Message Thomas Munro 2021-03-04 09:44:11 Re: pgbench: option delaying queries till connections establishment?