| From: | Alessio Bragadini <alessio(at)albourne(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: SQL for CREATE RULE |
| Date: | 2001-07-16 14:01:36 |
| Message-ID: | 3B52F3C0.AF1B561A@albourne.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Bryan Buchanan wrote:
> I have two tables:
>
> journal_master (serial #, account, date, debit $, credit $)
> journal_summary (account, date, debit $, credit $)
>
> each time a transaction occurs, a new journal_master row is
> added, and the cumulative amounts added to the summary table.
You don't need a RULE but a TRIGGER. Check out PostgreSQL's
documentation.
Yes, it's possible and it's similar to your solution.
--
Alessio F. Bragadini alessio(at)albourne(dot)com
APL Financial Services http://village.albourne.com
Nicosia, Cyprus phone: +357-2-755750
"It is more complicated than you think"
-- The Eighth Networking Truth from RFC 1925
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Vilson farias | 2001-07-16 14:22:38 | slow line insert |
| Previous Message | Szabo Zoltan | 2001-07-16 14:00:51 | Re: autoincrement??? |