just curious

Поиск
Список
Период
Сортировка
Искать

just curious

От:
Felipe Schnack <felipes@ritterdosreis.br>
Дата:
  If I'm using pgsql with autocommit ON and I execute a batch of
commands (executeBatch()), if one of the commands fails, what happens?
The database will act like the batch is a transaction and will
"rollback"?

-- 

Felipe Schnack
Analista de Sistemas
felipes@ritterdosreis.br
Cel.: (51)91287530
Linux Counter #281893

Faculdade Ritter dos Reis
www.ritterdosreis.br
felipes@ritterdosreis.br
Fone/Fax.: (51)32303328

Re: just curious

От:
Barry Lind <barry@xythos.com>
Дата:
Felipe,

I don't think the jdbc spec allows you to use batch opperations with 
autocommit set to true.

--Barry

Felipe Schnack wrote:

> Subject: [JDBC] just curious
> From: Felipe Schnack 
> To: pgsql-jdbc 
> Date: 16 Sep 2002 16:40:32 -0300
> 
>  If I'm using pgsql with autocommit ON and I execute a batch of
> commands (executeBatch()), if one of the commands fails, what happens?
> The database will act like the batch is a transaction and will
> "rollback"?
> 
> --
> 
> Felipe Schnack
> Analista de Sistemas
> felipes@ritterdosreis.br
> Cel.: (51)91287530
> Linux Counter #281893
> 
> Faculdade Ritter dos Reis
> www.ritterdosreis.br
> felipes@ritterdosreis.br
> Fone/Fax.: (51)32303328
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

Re: just curious

От:
Felipe Schnack <felipes@ritterdosreis.br>
Дата:
   Hmm....... interessanting. Well, I heard in this list that I
shouldn't set autocommit using JDBC driver setAutocommit() method right
now... So, my better option now is set the database to work with
autocommit=off right now?

On Mon, 2002-09-16 at 22:37, Barry Lind wrote:
> Felipe,
> 
> I don't think the jdbc spec allows you to use batch opperations with 
> autocommit set to true.
> 
> --Barry
> 
> Felipe Schnack wrote:
> 
> > Subject: [JDBC] just curious
> > From: Felipe Schnack 
> > To: pgsql-jdbc 
> > Date: 16 Sep 2002 16:40:32 -0300
> > 
> >  If I'm using pgsql with autocommit ON and I execute a batch of
> > commands (executeBatch()), if one of the commands fails, what happens?
> > The database will act like the batch is a transaction and will
> > "rollback"?
> > 
> > --
> > 
> > Felipe Schnack
> > Analista de Sistemas
> > felipes@ritterdosreis.br
> > Cel.: (51)91287530
> > Linux Counter #281893
> > 
> > Faculdade Ritter dos Reis
> > www.ritterdosreis.br
> > felipes@ritterdosreis.br
> > Fone/Fax.: (51)32303328
> > 
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
-- 

Felipe Schnack
Analista de Sistemas
felipes@ritterdosreis.br
Cel.: (51)91287530
Linux Counter #281893

Faculdade Ritter dos Reis
www.ritterdosreis.br
felipes@ritterdosreis.br
Fone/Fax.: (51)32303328

Re: just curious

От:
Barry Lind <barry@xythos.com>
Дата:
Felipe,

No you misunderstood the other messages on the list.  You certainly can 
setAutocommit() in the driver.  What you should not do in a 7.3beta1 
database is set the postgresql.conf parameter autocommit to off.  This 
is a server setting, not a jdbc setting.  The driver currently only 
supports the default server setting for autocommit.

thanks,
--Barry


Felipe Schnack wrote:
>    Hmm....... interessanting. Well, I heard in this list that I
> shouldn't set autocommit using JDBC driver setAutocommit() method right
> now... So, my better option now is set the database to work with
> autocommit=off right now?
> 
> On Mon, 2002-09-16 at 22:37, Barry Lind wrote:
> 
>>Felipe,
>>
>>I don't think the jdbc spec allows you to use batch opperations with 
>>autocommit set to true.
>>
>>--Barry
>>
>>Felipe Schnack wrote:
>>
>>
>>>Subject: [JDBC] just curious
>>>From: Felipe Schnack 
>>>To: pgsql-jdbc 
>>>Date: 16 Sep 2002 16:40:32 -0300
>>>
>>> If I'm using pgsql with autocommit ON and I execute a batch of
>>>commands (executeBatch()), if one of the commands fails, what happens?
>>>The database will act like the batch is a transaction and will
>>>"rollback"?
>>>
>>>--
>>>
>>>Felipe Schnack
>>>Analista de Sistemas
>>>felipes@ritterdosreis.br
>>>Cel.: (51)91287530
>>>Linux Counter #281893
>>>
>>>Faculdade Ritter dos Reis
>>>www.ritterdosreis.br
>>>felipes@ritterdosreis.br
>>>Fone/Fax.: (51)32303328
>>>
>>>
>>>---------------------------(end of broadcast)---------------------------
>>>TIP 3: if posting/reading through Usenet, please send an appropriate
>>>subscribe-nomail command to majordomo@postgresql.org so that your
>>>message can get through to the mailing list cleanly
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 6: Have you searched our list archives?
>>
>>http://archives.postgresql.org
> 

FAQ