Re: Transactional behaviour with trigger

From: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Transactional behaviour with trigger
Date: 2006-09-17 14:56:17
Message-ID: 1158504977.6107.27.camel@panoramix
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi Michael,

Thanks for answering.

On Sun, 2006-09-17 at 08:36 -0600, Michael Fuhr wrote:
> On Sun, Sep 17, 2006 at 02:32:10PM +0200, Joost Kraaijeveld wrote:
> Where does prototype.customers fit in? Are you sure it has a row
> that matches the WHERE clause? Where would that row have come from?
I have solved it by rethinking what was actually happening and boosting
the traces of JBoss to see what it actually did.

It actually did this:
1. start transaction
2. add customer record
3. add contactaddress record
4 update the customer record <--- !!!!
5. end transction

So I moved the update of the materialized view to an update trigger of
the customer table and now it works.

> Is there a reason you're maintaining customeraddress as a materialized
> view rather than as a "real" view?
Pure performance reasons.

--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Aaron Bono 2006-09-17 16:16:03 Re: Dividing results from two tables with different time frames
Previous Message Michael Fuhr 2006-09-17 14:36:46 Re: Transactional behaviour with trigger