Re: trigger is holding up the data

From: "Gregory Wood" <gregw(at)com-stock(dot)com>
To: "Nate Haggard" <nate(at)wordplace(dot)com>
Cc: "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: trigger is holding up the data
Date: 2001-12-31 16:14:45
Message-ID: 00b701c19217$8b34a1f0$7889ffcc@comstock.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Why not make the trigger that performs the insert into event an AFTER
trigger? Assuming that you don't need to modify the values, that should
allow you to read any values that were just inserted/updated. If not, you
should be able to split the triggers into both BEFORE and AFTER to achieve
the results you want.

Greg

----- Original Message -----
From: "Nate Haggard" <nate(at)wordplace(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Friday, December 28, 2001 6:13 PM
Subject: [GENERAL] trigger is holding up the data

> I have a database with multiple tables. I have a trigger set on the event
> table. When events occur a tuple is inserted into event and the trigger
is
> activated. In the trigger program I also want to look up data in other
> tables based on the data inserted into the event table. Usually the data
I
> want to see from the other tables does not exist until the trigger program
> has exited. How can I make the trigger activate only after all tables in
> the database have been changed. It would still trigger on new events, but
> it wouldn't run the program till all the tables that needed to be updated
> were updated.
>
> Thanks
> Nate
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message wsheldah 2001-12-31 16:18:50 Re: date/time formats in 7.2
Previous Message Bruce Momjian 2001-12-31 12:51:55 Year in Review