Ganesh,
Did you have a look at example Example 35-2. A PL/pgSQLhttp://stream.boxwatch.ru/docs/current/static/plpgsql-trigger.html
RegdsmaLLAH