Re: Problem with plpgsql TRIGGER

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Maciej Fuchs <maciej(dot)fuchs(at)NOSPAM(dot)reger(dot)pl>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem with plpgsql TRIGGER
Date: 2003-01-23 21:52:49
Message-ID: 20030123135218.E16806-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Fri, 17 Jan 2003, Maciej Fuchs wrote:

> 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.

What version are you using and what do the actual table definitions look
look like?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-01-23 22:37:15 Re: ORDER BY 'criteria'
Previous Message Greg Copeland 2003-01-23 21:48:48 Re: [HACKERS] C++ coding assistance request for a