Peter Eisentraut 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
On 13.03.23 02:17, Michael Paquier wrote:
On Sun, Mar 12, 2023 at 01:05:39PM -0700, Andrey Borodin wrote:
In the review above Kyotaro-san suggested that message should contain
information on what it expects... So, maybe then
pg_log_error("\\watch interval must be non-negative number, but
On Thu, Apr 6, 2023 at 10:23 PM Tom Lane wrote:
>
> Kirk Wolak writes:
> > Marked as Ready for Committer.
>
> Pushed with a pretty fair number of cosmetic changes.
Great, thank you!
> If you write a semicolon first, you get four, but it's the semicolon
> producing the first result not \watch.
Kirk Wolak 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
On Fri, Mar 24, 2023 at 10:32 PM Andrey Borodin
wrote:
> On Thu, Mar 23, 2023 at 10:15 PM Yugo NAGATA wrote:
> >
> > Here is my review on the v9 patch.
> >
> > + /* we do not prevent numerous names iterations like
> i=1 i=1 i=1 */
> > + have_sleep = true;
> >
On Thu, Mar 23, 2023 at 10:15 PM Yugo NAGATA wrote:
>
> Here is my review on the v9 patch.
>
> + /* we do not prevent numerous names iterations like i=1
> i=1 i=1 */
> + have_sleep = true;
>
> Why this is allowed here? I am not sure there is any reason to
Hello,
On Thu, 16 Mar 2023 21:15:30 -0700
Andrey Borodin wrote:
> On Wed, Mar 15, 2023 at 5:54 PM Michael Paquier wrote:
> >
> > On Wed, Mar 15, 2023 at 04:58:49PM +0900, Michael Paquier wrote:
> > > Yep. You are right.
> >
> > Fixed that and applied 0001.
> Great, thanks!
>
> >
> > +
On Wed, Mar 15, 2023 at 5:54 PM Michael Paquier wrote:
>
> On Wed, Mar 15, 2023 at 04:58:49PM +0900, Michael Paquier wrote:
> > Yep. You are right.
>
> Fixed that and applied 0001.
Great, thanks!
>
> +valptr++;
> +if (strncmp("i", opt, strlen("i")) == 0 ||
> +
On Wed, Mar 15, 2023 at 04:58:49PM +0900, Michael Paquier wrote:
> Yep. You are right.
Fixed that and applied 0001.
+valptr++;
+if (strncmp("i", opt, strlen("i")) == 0 ||
+strncmp("interval", opt, strlen("interval")) == 0)
+{
Did you look at process_command_g_options()
On Tue, Mar 14, 2023 at 09:23:48PM -0700, Nathan Bossart wrote:
> + sleep = strtod(opt, _end);
> + if (sleep < 0 || *opt_end || errno == ERANGE)
>
> Should we set errno to 0 before calling strtod()?
Yep. You are right.
--
Michael
signature.asc
+ sleep = strtod(opt, _end);
+ if (sleep < 0 || *opt_end || errno == ERANGE)
Should we set errno to 0 before calling strtod()?
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
On Tue, Mar 14, 2023 at 08:20:23PM -0700, Andrey Borodin wrote:
> PFA v8. Thanks!
Looks OK to me. I've looked as well at resetting query_buffer on
failure, which I guess is better this way because this is an
accumulation of the previous results, right?
--
Michael
signature.asc
Description: PGP
On Tue, Mar 14, 2023 at 6:25 PM Michael Paquier wrote:
>
> On Wed, Mar 15, 2023 at 10:19:28AM +0900, Kyotaro Horiguchi wrote:
> > I hesitated to propose such a level of simplification, but basically I
> > was alsothinking the same thing.
+1
> Okay, fine by me to use one single message. I'd
On Wed, Mar 15, 2023 at 10:19:28AM +0900, Kyotaro Horiguchi wrote:
> I hesitated to propose such a level of simplification, but basically I
> was alsothinking the same thing.
Okay, fine by me to use one single message. I'd rather still keep the
three tests, though, as they check the three
At Tue, 14 Mar 2023 12:03:00 -0700, Nathan Bossart
wrote in
> On Tue, Mar 14, 2023 at 01:58:59PM +0900, Kyotaro Horiguchi wrote:
> > + if (*opt_end)
> > + pg_log_error("\\watch: incorrect
> > interval value '%s'", opt);
> > +
On Tue, Mar 14, 2023 at 01:58:59PM +0900, Kyotaro Horiguchi wrote:
> + if (*opt_end)
> + pg_log_error("\\watch: incorrect
> interval value '%s'", opt);
> + else if (errno == ERANGE)
> +
At Tue, 14 Mar 2023 11:36:17 +0900, Michael Paquier wrote
in
> Ok, thanks for looking. Let's wait a bit and see if others have an
> opinion to offer. At least, the CI is green.
+ if (*opt_end)
+ pg_log_error("\\watch:
On Mon, Mar 13, 2023 at 06:14:18PM -0700, Andrey Borodin wrote:
> Looks good to me.
Ok, thanks for looking. Let's wait a bit and see if others have an
opinion to offer. At least, the CI is green.
--
Michael
signature.asc
Description: PGP signature
On Mon, Mar 13, 2023 at 5:26 PM Michael Paquier wrote:
>
> I have tweaked things as bit as of the attached, and ran pgindent.
> What do you think?
>
Looks good to me.
Thanks!
Best regards, Andrey Borodin.
On Sun, Mar 12, 2023 at 08:59:44PM -0700, Andrey Borodin wrote:
> I've tried this approach, but could not come up with sufficiently
> different error messages...
>
>> Wouldn't it be better to have a couple of regression
>> tests, as well?
> Added two tests.
It should have three tests with one
Michael, thanks for reviewing this!
On Sun, Mar 12, 2023 at 6:17 PM Michael Paquier wrote:
>
> On Sun, Mar 12, 2023 at 01:05:39PM -0700, Andrey Borodin wrote:
> > In the review above Kyotaro-san suggested that message should contain
> > information on what it expects... So, maybe then
> >
On Mon, Mar 13, 2023 at 10:17:12AM +0900, 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.
While on it, I have some comments about
On Sun, Mar 12, 2023 at 01:05:39PM -0700, Andrey Borodin wrote:
> In the review above Kyotaro-san suggested that message should contain
> information on what it expects... So, maybe then
> pg_log_error("\\watch interval must be non-negative number, but
> argument is '%s'", opt); ?
> Or perhaps
On Thu, Mar 9, 2023 at 11:25 AM Nathan Bossart wrote:
>
> + pg_log_error("Watch period must be
> non-negative number, but argument is '%s'", opt);
>
> After looking around at the other error messages in this file, I think we
> should make this more concise. Maybe
+ pg_log_error("Watch period must be non-negative
number, but argument is '%s'", opt);
After looking around at the other error messages in this file, I think we
should make this more concise. Maybe something like
pg_log_error("\\watch: invalid delay
On Wed, Mar 8, 2023 at 10:49 AM Nathan Bossart wrote:
>
> Is there any reason to disallow 0 for the sleep argument? I often use
> commands like "\watch .1" to run statements repeatedly with very little
> time in between, and I'd use "\watch 0" instead if it was available.
>
Yes, that makes
+1 for adding an iteration count argument to \watch.
+ char *opt_end;
+ sleep = strtod(opt, _end);
+ if (sleep <= 0 || *opt_end)
+ {
+ pg_log_error("Watch period must be positive
Thanks for looking into this!
On Mon, Feb 20, 2023 at 6:15 PM Kyotaro Horiguchi
wrote:
>
> FWIW the patch still accepts an incorrect parameter '1abc'
> by ignoring any trailing garbage.
Indeed, fixed.
>
> In any case, I reckon the error message should be more specific. In
> other words, it
At Mon, 20 Feb 2023 10:45:53 -0800, Andrey Borodin
wrote in
> > > > Also, if we do not provide a timespan, 2 seconds are selected. But if
> > > > we provide an incorrect argument - 1 second is selected.
> > > > PFA the patch that adds iteration count argument and makes timespan
> > > > argument
> > > Also, if we do not provide a timespan, 2 seconds are selected. But if
> > > we provide an incorrect argument - 1 second is selected.
> > > PFA the patch that adds iteration count argument and makes timespan
> > > argument more consistent.
> >
> > That should probably be fixed.
>
> And should
Greetings,
* Peter Eisentraut (peter.eisentr...@enterprisedb.com) wrote:
> On 17.02.23 00:33, Andrey Borodin wrote:
> > From time to time I want to collect some stats from locks, activity
> > and other stat views into one table from different time points. In
> > this case the \watch psql command
On 17.02.23 00:33, Andrey Borodin wrote:
From time to time I want to collect some stats from locks, activity
and other stat views into one table from different time points. In
this case the \watch psql command is very handy. However, it's not
currently possible to specify the number of times a
Hi hackers!
>From time to time I want to collect some stats from locks, activity
and other stat views into one table from different time points. In
this case the \watch psql command is very handy. However, it's not
currently possible to specify the number of times a query is
performed.
Also, if
33 matches
Mail list logo