Re: psql \watch 2nd argument: iteration count - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql \watch 2nd argument: iteration count
Date
Msg-id 2476490.1680801778@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql \watch 2nd argument: iteration count  (Kirk Wolak <wolakk@gmail.com>)
Responses Re: psql \watch 2nd argument: iteration count
List pgsql-hackers
Kirk Wolak <wolakk@gmail.com> writes:
> Marked as Ready for Committer.

Pushed with a pretty fair number of cosmetic changes.

One non-cosmetic change I made is that I didn't agree with your
interpretation of the execution count.  IMO this ought to produce
three executions:

regression=# select 1 \watch c=3
Thu Apr  6 13:17:50 2023 (every 2s)

 ?column? 
----------
        1
(1 row)

Thu Apr  6 13:17:52 2023 (every 2s)

 ?column? 
----------
        1
(1 row)

Thu Apr  6 13:17:54 2023 (every 2s)

 ?column? 
----------
        1
(1 row)

regression=# 

If you write a semicolon first, you get four, but it's the semicolon
producing the first result not \watch.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
Next
From: Pavel Stehule
Date:
Subject: Re: Schema variables - new implementation for Postgres 15