Received: from gw.acate.com.br ([200.215.17.89]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eADKC3s91380 for ; Mon, 13 Nov 2000 15:12:03 -0500 (EST) (envelope-from edmar@brasmap.com) Received: from ana ([192.168.1.13]) by gw.acate.com.br (8.9.3/8.9.3) with SMTP id SAA27487; Mon, 13 Nov 2000 18:10:15 -0200 From: "Edmar Wiggers" To: "Cristi Petrescu-Prahova" , Subject: RE: how to continue a transaction after an error? Date: Mon, 13 Nov 2000 18:13:13 -0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 In-reply-to: <002e01c04da9$a8f95c20$25efe6c1@lasting.ro> Importance: Normal X-Archive-Number: 200011/101 X-Sequence-Number: 132 I believe the known mechanism to cope with errors inside transactions are savepoints. That doesn't seem to be the case, though. If you don't care if some inserts fail, then you have multiple transactions instead of just one (use autocommit). If you want a transaction, check existence before each insert. That's the way to do it. > -----Original Message----- > I would like to insert a bunch of rows in a table in a > transaction. Some of > the insertions will fail due to constraints violation. When this happens, > Postgres automatically ends the transaction and rolls back all > the previous > inserts. I would like to continue the transaction and issue the > commit/rollback command myself.