Re: Mutating table (urgent) - Mailing list pgsql-general

From Cristian Custodio
Subject Re: Mutating table (urgent)
Date
Msg-id 001601c2d9fe$62dcbff0$fb01a8c0@ttcristian
Whole thread Raw
In response to Re: Mutating table (urgent)  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
Sorry, Now I'm undestandy you.

I thinked RETURN NULL was obrigated for all triggers functions.

I change for RETURN NEW and then it work fine.

Thanks,

Cristian




----- Original Message -----
From: "Stephan Szabo" <sszabo@megazone23.bigpanda.com>
To: "Cristian Custodio" <crstian@terra.com.br>
Cc: <pgsql-general@postgresql.org>
Sent: Friday, February 21, 2003 5:46 PM
Subject: Re: [GENERAL] Mutating table (urgent)


On Fri, 21 Feb 2003, Cristian Custodio wrote:

> Because whether postgresql don't send me the error.

But AFAICS there isn't any error to send you.  Maybe I'm
missing something, but it seems to me the sequence is:

Do an insert on PAI
Run after trigger which tries an insert on FILHO
 Run before trigger on FILHO
 Ignore insert

No constraints seem to be violated, no errors are occurring.  You've
told the system that inserts to FILHO are silently ignored (by
returning NULL from the trigger), so it seems to be doing
exactly what you asked for.




---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org




pgsql-general by date:

Previous
From: Dennis Gearon
Date:
Subject: escaping and sql injection
Next
From: Steve Crawford
Date:
Subject: What filesystem?