Recognize the creating of duplicate row from trigger

From: dipti shah <shahdipti1980(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Recognize the creating of duplicate row from trigger
Date: 2010-04-20 11:04:27
Message-ID: v2zd5b05a951004200404sa769a7eaq4ad548d73680481d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have created a trigger which updates the correspondign LogTable for
PrimaryTable. If the insert to LogTable would create a duplicate row then
the trigger should take no action and should return. Could you tell me how
could I achieve this? I have all columns as a primary key in LogTable. It is
intentional but I don't want my trigger to fail if tried to insert duplicate
row and rollback the transaction. It should not take any action(should not
insert duplication row) and returns when duplicate row is recognized.

Thanks,
Dipti

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2010-04-20 11:21:12 Re: Culturally aware initcap
Previous Message cojack 2010-04-20 09:59:44 Re: Ltree - how to sort nodes on parent node