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-04-21 06:32:48 |
Message-ID: | CAFj8pRDZJQRUF5u=_MfaRCBQ+VB9NF+XNYv+0x=3GkryCFb8=w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi
čt 8. 4. 2021 v 1:38 odesílatel Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
napsal:
> Here's a rebase, due to a conflict with 3a513067 "psql: Show all query
> results by default" which moved a few things around making it harder
> to use the pager for the right scope. Lacking time, I came up with
> this change to PSQLexecWatch():
>
> + if (printQueryFout)
> + {
> + restoreQueryFout = pset.queryFout;
> + pset.queryFout = printQueryFout;
> + }
> +
> SetCancelConn(pset.db);
> res = SendQueryAndProcessResults(query, &elapsed_msec, true);
> ResetCancelConn();
>
> fflush(pset.queryFout);
>
> + if (restoreQueryFout)
> + pset.queryFout = restoreQueryFout;
> +
>
> If someone has a tidier way to factor this, I'm keen to hear it. I'd
> like to push this today.
>
here is an rebase of Thomas's implementation
Regards
Pavel
Attachment | Content-Type | Size |
---|---|---|
v6-0001-Add-PSQL_WATCH_PAGER-for-psql-s-watch-command.patch | text/x-patch | 10.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2021-04-21 06:43:03 | Re: [HACKERS] logical decoding of two-phase transactions |
Previous Message | Ondřej Žižka | 2021-04-21 06:25:54 | Re: Synchronous commit behavior during network outage |