pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Exception When Insert Followed By Delete In PL/PGSQL
2+ messages / 2 participants
[nested] [flat]

* Exception When Insert Followed By Delete In PL/PGSQL
@ 2001-11-26 01:40 cnliou@eurosport.com
  2001-11-26 01:53 ` Re: Exception When Insert Followed By Delete In PL/PGSQL Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: cnliou@eurosport.com @ 2001-11-26 01:40 UTC (permalink / raw)
  To: pgsql-sql

Hello!

The exception is raised by PL/PGSQL in version
PostgreSQL 7.1.3.:

triggered data change violation on relation
"mastertable"

The code having problem:

DECLARE
  n smallint;
BEGIN
  insert into MasterTable values...;
  SELECT COUNT(*) INTO n FROM DetailTable,MasterTable
WHERE DetailTable.KeyField = MasterTable.KeyField;   
   IF n = 0 THEN
    DELETE FROM MasterTable WHERE ...; --exception
raised
  END IF;
END;

--------------------------------------------------------
You too can have your own email address from Eurosport.
http://www.eurosport.com








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

* Re: Exception When Insert Followed By Delete In PL/PGSQL
  2001-11-26 01:40 Exception When Insert Followed By Delete In PL/PGSQL cnliou@eurosport.com
@ 2001-11-26 01:53 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2001-11-26 01:53 UTC (permalink / raw)
  To: cnliou@eurosport.com; +Cc: pgsql-sql

<cnliou@eurosport.com> writes:
> triggered data change violation on relation "mastertable"

The "triggered data change" error check is gone entirely as of 7.2b3.

			regards, tom lane



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


end of thread, other threads:[~2001-11-26 01:53 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-11-26 01:40 Exception When Insert Followed By Delete In PL/PGSQL cnliou@eurosport.com
2001-11-26 01:53 ` 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