From: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
To: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Transactional behaviour with trigger
Date: Sun, 17 Sep 2006 16:56:17 +0200
Message-ID: <1158504977.6107.27.camel@panoramix> (raw)
In-Reply-To: <20060917143646.GA96792@winnie.fuhr.org>
References: <1158496330.6107.17.camel@panoramix>
<20060917143646.GA96792@winnie.fuhr.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: J.Kraaijeveld@Askesis.nl, mike@fuhr.org
Subject: Re: Transactional behaviour with trigger
In-Reply-To: <1158504977.6107.27.camel@panoramix>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox