Re: Transactional behaviour with trigger

Поиск
Список
Период
Сортировка
От Joost Kraaijeveld
Тема Re: Transactional behaviour with trigger
Дата
Msg-id 1158504977.6107.27.camel@panoramix
обсуждение исходный текст
Ответ на Re: Transactional behaviour with trigger  (Michael Fuhr <mike@fuhr.org>)
Список 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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Transactional behaviour with trigger
Следующее
От: "Aaron Bono"
Дата:
Сообщение: Re: Dividing results from two tables with different time frames