pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: cnliou@eurosport.com
To: pgsql-sql@postgresql.org
Subject: Exception When Insert Followed By Delete In PL/PGSQL
Date: Mon, 26 Nov 2001 01:40:53 GMT
Message-ID: <200111260140.35e7@lh00.opsion.fr> (raw)

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








view thread (2+ messages)  latest in thread

Message-ID: <200111260140.35e7@lh00.opsion.fr>
Permalink:  ../200111260140.35e7@lh00.opsion.fr/
Also on:    postgresql.org/message-id/200111260140.35e7@lh00.opsion.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: cnliou@eurosport.com
  Subject: Re: Exception When Insert Followed By Delete In PL/PGSQL
  In-Reply-To: <200111260140.35e7@lh00.opsion.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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