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

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prevent psql \watch from running queries that return no rows
Date: 2023-06-04 18:55:12
Message-ID: CAKAnmmL-ame4jd0W1+X_wgywjQOwdh_ZJhF4dtWsQaGs0fM11Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 3, 2023 at 5:58 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:

>
> Wouldn't something like a target_rows be more flexible? You could use
> this parameter with a target number of rows to expect, zero being one
> choice in that.
>

Thank you! That does feel better to me. Please see attached a new v2 patch
that uses
a min_rows=X syntax (defaults to 0). Also added some help.c changes.

Cheers,
Greg

Attachment Content-Type Size
psql_watch_exit_on_zero_rows_v2.patch application/octet-stream 8.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2023-06-04 23:44:47 Re: Do we want a hashset type?
Previous Message Amit Kapila 2023-06-04 18:14:56 Re: running logical replication as the subscription owner