pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedRe:
2+ messages / 2 participants
[nested] [flat]
* Re:
@ 2005-02-08 10:17 Surabhi Ahuja <surabhi.ahuja@iiitb.ac.in>
0 siblings, 1 reply; 2+ messages in thread
From: Surabhi Ahuja @ 2005-02-08 10:17 UTC (permalink / raw)
To: Jan Poslusny <pajout@gingerall.cz>; +Cc: pgsql-general
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.
> ?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re:
@ 2005-02-08 10:25 Jan Poslusny <pajout@gingerall.cz>
parent: Surabhi Ahuja <surabhi.ahuja@iiitb.ac.in>
0 siblings, 0 replies; 2+ messages in thread
From: Jan Poslusny @ 2005-02-08 10:25 UTC (permalink / raw)
To: Surabhi Ahuja <surabhi.ahuja@iiitb.ac.in>; +Cc: pgsql-general
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.
> > ?
>
>
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-02-08 10:25 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-02-08 10:17 Re: Surabhi Ahuja <surabhi.ahuja@iiitb.ac.in>
2005-02-08 10:25 ` Jan Poslusny <pajout@gingerall.cz>
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