From: Jan Poslusny <pajout@gingerall.cz>
To: Surabhi Ahuja <surabhi.ahuja@iiitb.ac.in>
Cc: pgsql-general@postgresql.org
Subject: Re:
Date: Tue, 08 Feb 2005 11:25:47 +0100
Message-ID: <420893AB.7030201@gingerall.cz> (raw)
In-Reply-To: <CE5C48E227F8ED4990FAC4332100ADC621B4DC@EVS.iiitb.ac.in>
References: <CE5C48E227F8ED4990FAC4332100ADC621B4DC@EVS.iiitb.ac.in>
If you want to realize your insert chain in plpgsql, trapping exceptions
is a good idea, imho. But I am not experienced with these new features
in pg 8.0 ...
Surabhi Ahuja wrote:
> cant the same be done by trapping the errors. by trapping these
> exceptions?
> http://www.postgresql.org/docs/8.0/interactive/plpgsql-control-structures.html
>
> search for "trapping errors" ?
>
> ------------------------------------------------------------------------
> *From:* Jan Poslusny [mailto:pajout@gingerall.cz]
> *Sent:* Tue 2/8/2005 3:30 PM
> *To:* Surabhi Ahuja
> *Cc:* pgsql-general@postgresql.org
> *Subject:* Re: [GENERAL]
>
> ***********************
> Your mail has been scanned by InterScan VirusWall.
> ***********-***********
>
>
> You can use savepoints in pg 8.0:
> http://www.postgresql.org/docs/8.0/static/sql-savepoint.html
>
> Surabhi Ahuja wrote:
>
> > in a transaction i try to insert into a table1, followed by insert
> > into table 2 then insert into table 3 and last insert into table 4.
> > However if a unique key violation occurs in the table 1 , the whole
> > trabnsaction aborts. is there no way , where i can ignore this
> > violation, and continue with the remaining insertions.
> > ?
>
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: pajout@gingerall.cz, surabhi.ahuja@iiitb.ac.in
Subject: Re:
In-Reply-To: <420893AB.7030201@gingerall.cz>
References: <CE5C48E227F8ED4990FAC4332100ADC621B4DC@EVS.iiitb.ac.in> <420893AB.7030201@gingerall.cz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox