Re: [SQL] Proposed archival read only trigger on rows - prevent history modification

2008-01-28 Thread chester c young
> I'm considering building a protective mechanism, and am seeking > feedback > on the idea. The approach would be to add a new column named "ro" to > each table at invoice level and below. Then have a trigger on > 'ro'==true deny the write, and probably raise a huge stink. As > invoice > are ma

[SQL] Proposed archival read only trigger on rows - prevent history modification

2008-01-28 Thread Bryce Nesbitt
I've got a largish database which once a month churns out some invoices. Once those invoices are created, there is zero business logic reason to ever modify the underlying data. A few hundred thousand database rows go into the building of each month's invoices. New data is added all the time, an

Re: [SQL] Slow Query problem

2008-01-28 Thread Tom Lane
Andreas Joseph Krogh <[EMAIL PROTECTED]> writes: > On Monday 28 January 2008 08:18:24 Premsun Choltanwanich wrote: >> I am currently using PostgreSQL database version 8.0.13. My problem >> relates to a slow result when a query using a defined view joins to another >> table for a result. > It is v

Re: [SQL] Slow Query problem

2008-01-28 Thread Andreas Joseph Krogh
On Monday 28 January 2008 08:18:24 Premsun Choltanwanich wrote: > Dear All, > > I am currently using PostgreSQL database version 8.0.13. My problem > relates to a slow result when a query using a defined view joins to another > table for a result. > > Background: I have 7 tables of invoice transa