Re: In one of negative test row-level trigger results into loop

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: In one of negative test row-level trigger results into loop
Date: 2012-09-26 04:27:48
Message-ID: 7FB9C4D9-4CD1-483E-8641-343A595961C7@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> But some other databases like Oracle handles the scenario reported but not
> loop.
> To handle for After triggers, there is mutation table concept in Oracle due
> to which it errors out
> and for Before triggers, it errors out with "maximum number of recursive SQL
> levels(50) exceeded".

Oracle uses some arbitrary number to prevent you from looping (50 apparently). A limit I've run into for perfectly valid situations. Thank you for preventing me from doing my job, Oracle.

Both databases have an upper limit. If you reach that limit with Postgres, you made a programming error that is easy to catch in development (before it reaches production). With Oracle, not so much.

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alan Nilsson 2012-09-26 05:02:37 Multiple Schema and extensions
Previous Message Jayadevan M 2012-09-26 03:25:39 Re: PostgreSQL data loads - turn off WAL