Re: Trigger loop question - Mailing list pgsql-general

From Tom Lane
Subject Re: Trigger loop question
Date
Msg-id 8983.1079396005@sss.pgh.pa.us
Whole thread Raw
In response to Trigger loop question  (Mike Nolan <nolan@gw.tssi.com>)
Responses Re: Trigger loop question
List pgsql-general
Mike Nolan <nolan@gw.tssi.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

pgsql-general by date:

Previous
From: Mike Nolan
Date:
Subject: Trigger loop question
Next
From: Alex Satrapa
Date:
Subject: Re: boolean to int