Re: Prevent psql \watch from running queries that return no rows

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
Cc: daniel(at)yesql(dot)se, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prevent psql \watch from running queries that return no rows
Date: 2023-07-26 00:41:36
Message-ID: ZMBrwMNMlI4WSxVn@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 05, 2023 at 10:14:22AM -0400, Greg Sabino Mullane wrote:
> Would like to hear others weigh in, I think it's still only three states
> plus a default, so I'm not convinced it warrants multiple statements yet. :)

I find that hard to parse, so having more lines to get a better idea
of what the states are would be good.

While on it, I can see that the patch has no tests. Could you add
something in psql's 001_basic.pl? The option to define the number of
iterations for \watch can make the tests predictible even for the
non-failure cases. I would do checks with incorrect values, as well,
see the part of the test script about the intervals.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message YANG Xudong 2023-07-26 01:25:42 Re: [PATCH] Add loongarch native checksum implementation.
Previous Message Andres Freund 2023-07-26 00:20:30 Re: Buildfarm animal grassquit is failing