Re: Remove unnecessary code from psql's watch command

From: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Remove unnecessary code from psql's watch command
Date: 2024-03-09 02:57:36
Message-ID: 20240309115736.ec710aea4b8c49445bf91893@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 08 Mar 2024 12:09:12 -0500
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp> writes:
> > On Wed, 06 Mar 2024 13:03:39 -0500
> > Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> I don't have Windows here to test on, but does the WIN32 code
> >> path work at all?
>
> > The outer loop is eventually exited even because PSQLexecWatch returns 0
> > when cancel_pressed = 0. However, it happens after executing an extra
> > query in this function not just after exit of the inner loop. Therefore,
> > it would be better to adding set and check of "done" in WIN32, too.
>
> Ah, I see now. Agreed, that could stand improvement.
>
> > I've attached the updated patch (v2_remove_unnecessary_code_in_psql_watch.patch).
>
> Pushed with minor tidying.

Thanks!

--
Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Will Mortensen 2024-03-09 04:25:36 Re: Exposing the lock manager's WaitForLockers() to SQL
Previous Message Yugo NAGATA 2024-03-09 02:57:18 Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value