public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: Fabrice Chapuis <[email protected]>
To: [email protected]
Subject: Re: infinite loop in an update statement
Date: Mon, 9 Sep 2024 08:00:19 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAA5-nLDmkuRbjHJvf2-Sz0FxtJtoFdrg4mUTy6N84UpZtGZJwQ@mail.gmail.com>
References: <CAA5-nLDmkuRbjHJvf2-Sz0FxtJtoFdrg4mUTy6N84UpZtGZJwQ@mail.gmail.com>

On 9/9/24 07:55, Fabrice Chapuis wrote:
> Hi,
> 
> table a and b are empty, this query does not return. It seems we enter 
> in infinite loop.
> why this update does not return instantly?
> 
> UPDATE table_a a
>   SET col1 = (SELECT MIN(b.col1)
>                      FROM table_b b
>                      WHERE b.col2 = a.col2)

Do you have an UPDATE trigger on table_a?

> 
> Regards,
> 
> Fabrice
> 
> 

-- 
Adrian Klaver
[email protected]







view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: infinite loop in an update statement
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox