creating triggers: need help

From: Navdeep Singh <navdeeps(dot)iitd(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: creating triggers: need help
Date: 2012-02-23 05:34:56
Message-ID: CAP0AM7z7x2vfRxzkZ9VVeD__nUeKdKgzJ+wZ_v6G1DawSpx1Kw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hey!

I am a penultimate year student of computer science and engg. I am looking
for a way to create a trigger in postgresql. I've found some abstract
methods for this on web but could not implement it. The description of the
trigger is as follows:
I have two tables, one named people and other named rich. The people
table contains two columns: name, no. of houses. The rich table contains
the same columns. I need to create a trigger to insert the tuple of the
people table into the rich table when the number of houses of the given
person (name) reaches, lets say 10.

Please help me with the sql commands to implement the aforementioned
transaction.

Thanks,
Navdeep
navdeeps(dot)iitd(at)gmail(dot)com

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bartosz Dmytrak 2012-02-23 10:21:48 Re: Partitioning (Was: Foreign Key to an (abstract?) Parent Table)
Previous Message Ganesh Borse 2012-02-23 01:48:43 Re: select on bytea column returns hex encoded data instead of binary data