Thread: Create (function, procedure) and trigger to increment a counter

Create (function, procedure) and trigger to increment a counter

From
Chris Barnes
Date:
I have a table usage, I would like to create a (function or procedure) called by the trigger to increment column counter after an update.

Can someone lend me a hand with the process behind creating this function,procedure and trigger.



               Table "public.usage"
    Column     |         Type          | Modifiers
---------------+-----------------------+-----------
 instrument    | character varying(13) |
 date          | date                  |
 counter       | integer               |




Internet Explorer 8 makes surfing easier. Get it now!