From: | "Rajat Katyal" <rajatk(at)intelesoftech(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Trigger function aborts the transaction on exception |
Date: | 2004-02-28 09:51:25 |
Message-ID: | 001701c3fde0$6f147860$2105a8c0@coffee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi:
I came to know from the postgresql documentation that PostgreSQL does not have a very smart exception handling model. I wonder whether anyone can help me or suggest some alternate solution for the problem stated below:
I have a trigger function defined for the insert and iam executing sql statement as:
insert into target_table select * from source_table;
Now there could be scenario that in some record error occured due to the typecast of char ---> numeric (e.g if it try to insert alphanumeric characters in the numeric datatype ) therefore i want to catch the execption and want to make it entry in some other table but my process of insertion for the other records should go on as they have valid records. But it throws the exception and aborts the transaction.
Please help me and suggest some solution for this problem.
Thanks in advance.
Rajat.
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2004-02-28 10:26:33 | Re: Trigger function aborts the transaction on exception |
Previous Message | Anton Nikiforov | 2004-02-28 08:43:45 | Re: PostgreSQL in Cluster |