pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
triggered data change violation
3+ messages / 2 participants
[nested] [flat]

* triggered data change violation
@ 2001-01-17 16:53  Cedar Cox <cedarc@visionforisrael.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Cedar Cox @ 2001-01-17 16:53 UTC (permalink / raw)
  To: pgsql-interfaces


ERROR:  triggered data change violation on relation "tblblah"

This is probably normal, but it just surprised me.  I'm not sure if this
is in the documentation.  A pl/pgsql trigger tried to DELETE the record
that fired it (AFTER UPDATE, not BEFORE).  Comments?  Can anyone clarify
why this is so?

-Cedar




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: triggered data change violation
@ 2001-03-20 18:13  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Cedar Cox <cedarc@visionforisrael.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2001-03-20 18:13 UTC (permalink / raw)
  To: Cedar Cox <cedarc@visionforisrael.com>; +Cc: pgsql-interfaces

Cedar Cox <cedarc@visionforisrael.com> writes:
> ERROR:  triggered data change violation on relation "tblstsc2options"

> What is this?  It doesn't happen unless I'm in a transaction.  I'm
> INSERTing a record and then DELETEing it (in the same transaction) and on
> delete I get this error.

That's exactly what it's unhappy about ... but I'm not too clear on
just *why* that should be considered an uncool thing to do when you
have an AFTER trigger on the table.  You're asking in the wrong list
though; try pgsql-hackers or pgsql-sql to see if someone knows why
this is bad.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* triggered data change violation
@ 2001-03-20 18:43  Cedar Cox <cedarc@visionforisrael.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Cedar Cox @ 2001-03-20 18:43 UTC (permalink / raw)
  To: pgsql-interfaces


ERROR:  triggered data change violation on relation "tblstsc2options"

What is this?  It doesn't happen unless I'm in a transaction.  I'm
INSERTing a record and then DELETEing it (in the same transaction) and on
delete I get this error.  If I commit and begin a new transaction before
the delete everything is fine.  Is it something my trigger causing?  I
don't have any UPDATE, INSERT, or DELETE statements in my trigger (and I
am returning old on delete).

Thanks,
-Cedar





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-03-20 18:43 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-17 16:53 triggered data change violation Cedar Cox <cedarc@visionforisrael.com>
2001-03-20 18:43 triggered data change violation Cedar Cox <cedarc@visionforisrael.com>
2001-03-20 18:13 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox