Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Continue transactions after errors in

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,"Greg Sabino Mullane" <greg(at)turnstep(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Continue transactions after errors in
Date: 2005-04-26 14:48:05
Message-ID: 6.2.0.14.0.20050427004454.053d5e48@203.8.195.10 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
At 12:28 AM 27/04/2005, Tom Lane wrote:
>Can you show a plausible use-case for such a thing?

A not-uncommon case in other DBs is to handle insert/update code where 
insert is the most likely result. Not sure if this is relevant to scripts:

Begin;
...do stuff...
insert into....
<trap duplicate index error and do update instead>
update...
...more stuff...
commit;


Also, the blunder-on-regardless approach is popular in pg_dump, or so I'm 
told ;-).


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 03 5330 3172          |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                  |    --________--
PGP key available upon request,  |  /
and from pgp.mit.edu:11371       |/ 


In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-04-26 14:49:03
Subject: btree_gist regression tests failing in 8.0 branch?
Previous:From: Harald FuchsDate: 2005-04-26 14:47:03
Subject: Re: Continue transactions after errors in psql

pgsql-patches by date

Next:From: Tom LaneDate: 2005-04-26 14:53:09
Subject: Re: [HACKERS] Continue transactions after errors in psql
Previous:From: Harald FuchsDate: 2005-04-26 14:47:03
Subject: Re: Continue transactions after errors in psql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group