Problem with plpgsql TRIGGER

From: Maciej Fuchs <maciej(dot)fuchs(at)NOSPAM(dot)reger(dot)pl>
To: pgsql-general(at)postgresql(dot)org
Subject: Problem with plpgsql TRIGGER
Date: 2003-01-17 12:56:18
Message-ID: b08ugu$8qg$3@news.tpi.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi there !

I have one strange problem with pgsql and pl/pgsql in deleteing data by
trigger.

The data is uploaded from mssql via DTS to the first table.

On that event the trigger is called and parting data into two cascade
referencing tables.

Everything is OK till I am going to update data.

the trigger should do sth like this:
DELETE * from table1 -- in that case all data from table2 are deleted too.
INSERT into table1
INSERT into table2

but... it wont go :/

If there is any record (id = NEW.id) postgres is calling about refereces
... well it should be deleted in the first step of trigger.

Does any one of you had sth. simmilar, please let me know.

Matwiej

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-01-17 14:49:51 Re: temporary tables on hd or in memory?
Previous Message Emmanuel Charpentier 2003-01-17 12:44:10 Strange error accessing *views* from Linux through ODBC