Re: psql \watch 2nd argument: iteration count

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Andrey Borodin <amborodin86(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, sfrost(at)snowman(dot)net, pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql \watch 2nd argument: iteration count
Date: 2023-05-09 15:55:07
Message-ID: 684838.1683647707@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> writes:
> On 13.03.23 02:17, Michael Paquier wrote:
>> I am not sure that this will be the last option we'll ever add to
>> \watch, so I'd rather have us choose a design more flexible than
>> what's proposed here, in a way similar to \g or \gx.

> On the other hand, we also have option syntax in \connect that is like
> -foo. Would that be a better match here? We should maybe decide before
> we diverge and propagate two different option syntaxes in backslash
> commands.

Reasonable point to raise, but I think \connect's -reuse-previous
is in the minority. \connect itself can use option=value syntax
in the conninfo string (in fact, I guess -reuse-previous was spelled
that way in hopes of not being confusable with a conninfo option).
We also have option=value in the \g and \gx commands. I don't see
any other psql metacommands that use options spelled like -foo.

In short, I'm satisfied with the current answer. There's still
time to debate it though.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-05-09 16:48:24 Re: benchmark results comparing versions 15.2 and 16
Previous Message Peter Eisentraut 2023-05-09 15:11:54 Re: psql \watch 2nd argument: iteration count