Re: JDBC behaviour

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bill Moran <wmoran(at)potentialtech(dot)com>
Cc: Vitalii Tymchyshyn <vit(at)tym(dot)im>, Craig Ringer <craig(at)2ndquadrant(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, John R Pierce <pierce(at)hogranch(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC behaviour
Date: 2016-02-20 17:31:38
Message-ID: 21531.1455989498@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-jdbc

Bill Moran <wmoran(at)potentialtech(dot)com> writes:
> On Sat, 20 Feb 2016 16:29:09 +0000
> Vitalii Tymchyshyn <vit(at)tym(dot)im> wrote:
>> Well, I suppose replacing simple copy with procedural per-row function
>> would give huge performance hit. Also what method do you propose to use in
>> the code? Savepoints?

> Not at all. PL/PGSQL's ON ERROR handling can manage this without needing
> savepoints.

Actually, plpgsql's exception blocks *are* savepoints under the hood.
The backend engine does not have any way of recovering from errors other
than a (sub)transaction abort, which means you can't do this without a
savepoint or equivalent.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vitalii Tymchyshyn 2016-02-20 17:34:39 Re: JDBC behaviour
Previous Message Bill Moran 2016-02-20 17:09:01 Re: JDBC behaviour

Browse pgsql-hackers by date

  From Date Subject
Next Message Vitalii Tymchyshyn 2016-02-20 17:34:39 Re: JDBC behaviour
Previous Message Bill Moran 2016-02-20 17:09:01 Re: JDBC behaviour

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vitalii Tymchyshyn 2016-02-20 17:34:39 Re: JDBC behaviour
Previous Message Bill Moran 2016-02-20 17:09:01 Re: JDBC behaviour