Update and trigger

From: "Medi Montaseri" <montaseri(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Update and trigger
Date: 2008-06-11 01:45:51
Message-ID: 8078a1730806101845x620d9f72p204d3cf94c0eb612@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I need to increament a counter such as myTable.Counter of type integer
everytime myTable.status a boolean column is updated. Can you help me
complete this...

create trigger counter_trigger after update on myTable.counter
execute procedure 'BEGIN statement; statement; statement END'

Q1- how do I narrow the event to "update on a column not a row"
Q2- can I just provide an inline procedure for the execute

Thanks
Medi

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message A. Kretschmer 2008-06-11 05:21:07 Re: Update and trigger
Previous Message Medi Montaseri 2008-06-10 20:11:23 Re: Conceptual Design Question