Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql

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



pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group