Exception When Insert Followed By Delete In PL/PGSQL

Поиск
Список
Период
Сортировка
Искать

Exception When Insert Followed By Delete In PL/PGSQL

От:
<cnliou@eurosport.com>
Дата:
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






Re: Exception When Insert Followed By Delete In PL/PGSQL

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
 writes:
> triggered data change violation on relation "mastertable"

The "triggered data change" error check is gone entirely as of 7.2b3.
		regards, tom lane

FAQ