public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: Fabrice Chapuis <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: infinite loop in an update statement
Date: Tue, 10 Sep 2024 07:57:40 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAA5-nLDjpv8eLeZDAr28xtefP4qYGr2g-5vgxf01Z5DojZ4HSg@mail.gmail.com>
References: <CAA5-nLDmkuRbjHJvf2-Sz0FxtJtoFdrg4mUTy6N84UpZtGZJwQ@mail.gmail.com>
	<[email protected]>
	<CAA5-nLDjpv8eLeZDAr28xtefP4qYGr2g-5vgxf01Z5DojZ4HSg@mail.gmail.com>

On 9/10/24 07:47, Fabrice Chapuis wrote:
Reply to list also
Ccing list

> no trigger on theses tables

> 
> On Mon, Sep 9, 2024 at 5:00 PM Adrian Klaver <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     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] <mailto:[email protected]>
> 

-- 
Adrian Klaver
[email protected]







view thread (4+ messages)

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