Re: how to continue using a connection after an error with autocommit=false

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: how to continue using a connection after an error with autocommit=false
Дата
Msg-id DE290AFE-67A3-4B0E-BFD1-B83533ED76A8@fastcrypt.com
обсуждение исходный текст
Ответ на Re: how to continue using a connection after an error with autocommit=false  (Tim Pizey <timp@melati.org>)
Ответы Re: how to continue using a connection after an error with autocommit=false  (Tim Pizey <timp@melati.org>)
Список pgsql-jdbc
On 28-Feb-07, at 3:41 PM, Tim Pizey wrote:

> On Tuesday 20 February 2007 10:50, Heikki Linnakangas wrote:
>> James Im wrote:
>>> I just find out that I cannot continue using a connection when I use
>>> autocommit=false and that an sql insert failed.
>>
>> That's intended behavior in PostgreSQL.
> [snip]
> This is new behaviour in version 8, I believe.
>
No, this has been around since 7.x
> I think this behaviour is unique to Postgresql?
>
Possibly
> Melati was developed with Postgresql version 6 as the target dbms
> back in 2000, since then it has been extended to work with the
> other common
> dbmsen, but now it looks like it won't work with V8, without quite
> a bit of
> rework.
>
> Is this behaviour specified by a standard?
>
> What are the advantages?
>
The advantage is that a transaction is atomic.

You can continue to use the connection, you simply have to rollback
the transaction after the error and start over.
You can also use savepoints.
> yours
> Tim Pizey
>
> --
> http://melati.org/ - the flower of Java.
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: 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
>


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Tim Pizey
Дата:
Сообщение: Re: how to continue using a connection after an error with autocommit=false
Следующее
От: "Ahmed Abd-el-Shafy Abd-Allah"
Дата:
Сообщение: Inserting "null" not working (Sun App Server, Postgres, EJB3)?