Re: \watch 0 or \watch 0.00001 doesn't do what I want

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: \watch 0 or \watch 0.00001 doesn't do what I want
Date: 2024-10-13 03:04:23
Message-ID: Zws4tyWVcBvj0ejQ@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 10, 2024 at 10:47:25AM +0500, Andrey M. Borodin wrote:
> Let’s add a comment to tight-loop if statement. And a test for the case.

+ /* Tight loop, no wait needed */
+ if (sleep_ms == 0)

Okay about this addition.

+psql_like($node, sprintf('SELECT 1 \watch c=3 i=%g', 0.0001),
+ qr/1\n1\n1/, '\watch with 3 iterations');

And I am fine with this addition as well, for the sleep_ms == 0 case.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Paul A Jungwirth 2024-10-13 05:25:40 Re: SQL:2011 application time
Previous Message Michael Paquier 2024-10-13 02:38:12 Re: Allow default \watch interval in psql to be configured