Skip site navigation (1) Skip section navigation (2)

BUG #2927: Trigger execution hides foreign key error

From: "Jaume Catarineu" <jaume(at)nobainfo(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2927: Trigger execution hides foreign key error
Date: 2007-01-24 12:34:14
Message-ID: 200701241234.l0OCYEPr001188@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      2927
Logged by:          Jaume Catarineu
Email address:      jaume(at)nobainfo(dot)net
PostgreSQL version: 8.2.1
Operating system:   Linux srvca01 2.6.11.4-20a-smp #1 SMP Wed Mar 23
21:52:37 UTC 2005 i686 i686 i386 GNU/Linux
Description:        Trigger execution hides foreign key error
Details: 

When a table has a foreign key field if you insert values that violate that
check an error appears:

ERROR:  insert or update on table "m_tran" violates foreign key constraint
"m_tran_fk"

That's ok, but when a INSERT trigger is added to that table, the precedent
insert order productes the following output:

INSERT 0 0

And no error appears anywhere: neither in the log nor the psql console.
Shouldn't PostgreSQL inform someway why it's not going to insert that row?

It seems like the correct trigger execution was hidding the previous
incorrect foreign key check. Is that way?

Thanks,
Jaume,

Responses

pgsql-bugs by date

Next:From: Jeff TroutDate: 2007-01-24 15:15:03
Subject: Function returns wrong data after datatype change
Previous:From: MandeepDate: 2007-01-24 09:05:47
Subject: BUG #2926: E_OUTOFMEMORY

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group