From: | Sridhar N Bamandlapally <sridhar(dot)bn1(at)gmail(dot)com> |
---|---|
To: | Dave Cramer <pg(at)fastcrypt(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bill Moran <wmoran(at)potentialtech(dot)com>, 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-23 04:06:21 |
Message-ID: | CAGuFTBXZ-CF8BRw9E-QcUBQ9UKSSYrZVqF8vwm18EsvJfbiOjw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers pgsql-jdbc |
I mean, we will not change existing functionality/behavior/code as there
may be dependency applications with same behavior
i.e. currently conn.setAutoCommit (false) is using "BEGIN;"
and the new functionality can be like conn.setAutoCommit(false,
<new-parameter> ), where new-parameter can be Boolean or flag which does
following way for statements
try
{
conn.savepoint(SP);
SQL-statement;
}
catch(Exception exp)
{
conn.rollback(SP);
throw exp;
}
autocommit is not option as end-user need control/decision to commit or
rollback on successful transactions
our applications build with Oracle, SQL-Sever compatible ( i.e. using
setAutCommit FALSE at every transaction ),
now are migrating applications compatible with PostgreSQL on cloud,
Thanks
Sridhar
On Mon, Feb 22, 2016 at 3:56 PM, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:
>
>
>
> On 22 February 2016 at 00:35, Sridhar N Bamandlapally <
> sridhar(dot)bn1(at)gmail(dot)com> wrote:
>
>>
>> I may be wrong, please correct if,
>>
>> can we do function overloading to add functionality with savepoint
>> option, i.e. with this both will be available and its app developers to
>> chose
>>
>
> Can you be explicit in what you are asking for please ?
>
> As John points out you can do this now by checking every commit.
>
>
> Dave Cramer
>
> davec(at)postgresintl(dot)com
> www.postgresintl.com
>
>>
>>
>>
>>
>> On Sat, Feb 20, 2016 at 11:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>
>>> 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
>>>
>>>
>>> --
>>> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgsql-jdbc
>>>
>>
>>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-02-23 04:19:44 | Re: Get the date of creation of objects in the database |
Previous Message | Stephen Frost | 2016-02-23 03:50:19 | Re: Get the date of creation of objects in the database |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-02-23 05:45:46 | Re: postgres_fdw vs. force_parallel_mode on ppc |
Previous Message | Tom Lane | 2016-02-23 03:31:44 | Re: postgres_fdw vs. force_parallel_mode on ppc |
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2016-02-23 12:01:59 | Re: JDBC behaviour |
Previous Message | Dave Cramer | 2016-02-22 10:26:47 | Re: JDBC behaviour |