Re: Trigger loop question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: pgsql-general(at)postgresql(dot)org (pgsql general list)
Subject: Re: Trigger loop question
Date: 2004-03-16 00:13:25
Message-ID: 8983.1079396005@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mike Nolan <nolan(at)gw(dot)tssi(dot)com> writes:
> If I set up an on update trigger for table 'A' that updates the
> corresponding column in table 'B', and one for table 'B' that updates
> the corresponding column in table 'A', does that create an endless loop?

Yes.

You could break the loop perhaps by not issuing an UPDATE if the data is
already correct in the other table.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alex Satrapa 2004-03-16 00:15:35 Re: boolean to int
Previous Message Mike Nolan 2004-03-16 00:01:01 Trigger loop question