Обсуждение: Exception When Insert Followed By Delete In PL/PGSQL

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

Exception When Insert Followed By Delete In PL/PGSQL

От
Дата:
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
Дата:
<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