Re: infinite loop in an update statement

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Fabrice Chapuis <fabrice636861(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: infinite loop in an update statement
Date: 2024-09-09 15:00:19
Message-ID: 4f5c2262-f869-4707-93cb-735267903da4@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-09-09 15:06:39 Re: Connection between PostgreSQL and SAP HANA database
Previous Message Tom Lane 2024-09-09 15:00:12 Re: infinite loop in an update statement