pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
There is acid without transactions ?
6+ messages / 3 participants
[nested] [flat]

* There is acid without transactions ?
@ 2007-03-11 16:05 Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
  2007-03-11 16:35 ` Re: There is acid without transactions ? Jonah H. Harris <jonah.harris@gmail.com>
  2007-03-11 16:42 ` Re: There is acid without transactions ? Michael Fuhr <mike@fuhr.org>
  0 siblings, 2 replies; 6+ messages in thread

From: Ezequias Rodrigues da Rocha @ 2007-03-11 16:05 UTC (permalink / raw)
  To: pgsql-sql

Hi list,

I would like to know if an statement like.

Insert into foo values (1,'Brazil');

Makes an ACID transaction. I am wondered if i must have a  Begin...Commit
statemnt to garantee my ACIDs transactions.

Regards ,

-- 
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use Mozilla Firefox:http://br.mozdev.org/firefox/

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: There is acid without transactions ?
  2007-03-11 16:05 There is acid without transactions ? Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
@ 2007-03-11 16:35 ` Jonah H. Harris <jonah.harris@gmail.com>
  2007-03-11 16:39   ` Re: There is acid without transactions ? Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Jonah H. Harris @ 2007-03-11 16:35 UTC (permalink / raw)
  To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>; +Cc: pgsql-sql

On 3/11/07, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
> Insert into foo values (1,'Brazil');

Assuming you're in psql or using the drivers in autocommit mode, then
yes, it's ACID compliant.  Individual statements are treated as an
implicit transaction unless you create an explicit transaction with
BEGIN ... (ROLLBACK | COMMIT).

Some of the drivers, however, will create an explicit transaction
behind-the-scenes if you have autocommit mode disabled.

Did that help or was it more confusing?

-- 
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation            | fax: 732.331.1301
33 Wood Ave S, 3rd Floor            | jharris@enterprisedb.com
Iselin, New Jersey 08830            | http://www.enterprisedb.com/



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: There is acid without transactions ?
  2007-03-11 16:05 There is acid without transactions ? Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
  2007-03-11 16:35 ` Re: There is acid without transactions ? Jonah H. Harris <jonah.harris@gmail.com>
@ 2007-03-11 16:39   ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
  2007-03-11 16:42     ` Re: There is acid without transactions ? Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
  2007-03-11 20:30     ` Re: There is acid without transactions ? Jonah H. Harris <jonah.harris@gmail.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Ezequias Rodrigues da Rocha @ 2007-03-11 16:39 UTC (permalink / raw)
  To: Jonah H. Harris <jonah.harris@gmail.com>; +Cc: pgsql-sql

Perfect. I just don't know what drivers you are talking about (odbc maybe).

More perfect is becouse you answare me in only 1 minute. What community
don't is ?

Ezequias

2007/3/11, Jonah H. Harris <jonah.harris@gmail.com>:
>
> On 3/11/07, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
> > Insert into foo values (1,'Brazil');
>
> Assuming you're in psql or using the drivers in autocommit mode, then
> yes, it's ACID compliant.  Individual statements are treated as an
> implicit transaction unless you create an explicit transaction with
> BEGIN ... (ROLLBACK | COMIT).
>
> Some of the drivers, however, will create an explicit transaction
> behind-the-scenes if you have autocommit mode disabled.
>
> Did that help or was it more confusing?
>
> --
> Jonah H. Harris, Software Architect | phone: 732.331.1324
> EnterpriseDB Corporation            | fax: 732.331.1301
> 33 Wood Ave S, 3rd Floor            | jharris@enterprisedb.com
> Iselin, New Jersey 08830            | http://www.enterprisedb.com/
>



-- 
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use Mozilla Firefox:http://br.mozdev.org/firefox/

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: There is acid without transactions ?
  2007-03-11 16:05 There is acid without transactions ? Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
  2007-03-11 16:35 ` Re: There is acid without transactions ? Jonah H. Harris <jonah.harris@gmail.com>
  2007-03-11 16:39   ` Re: There is acid without transactions ? Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
@ 2007-03-11 16:42     ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Ezequias Rodrigues da Rocha @ 2007-03-11 16:42 UTC (permalink / raw)
  To: Jonah H. Harris <jonah.harris@gmail.com>; +Cc: pgsql-sql

Sorry my mistake it was 32 minutes. I am confusing with gmail here.

Anyway today is sunday and it is more difficult to have a reply from
community. Anyway thanks.

Ezequias

2007/3/11, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>:
>
> Perfect. I just don't know what drivers you are talking about (odbc
> maybe).
>
> More perfect is becouse you answare me in only 1 minute. What community
> don't is ?
>
> Ezequias
>
> 2007/3/11, Jonah H. Harris <jonah.harris@gmail.com>:
> >
> > On 3/11/07, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
> > wrote:
> > > Insert into foo values (1,'Brazil');
> >
> > Assuming you're in psql or using the drivers in autocommit mode, then
> > yes, it's ACID compliant.  Individual statements are treated as an
> > implicit transaction unless you create an explicit transaction with
> > BEGIN ... (ROLLBACK | COMIT).
> >
> > Some of the drivers, however, will create an explicit transaction
> > behind-the-scenes if you have autocommit mode disabled.
> >
> > Did that help or was it more confusing?
> >
> > --
> > Jonah H. Harris, Software Architect | phone: 732.331.1324
> > EnterpriseDB Corporation            | fax: 732.331.1301
> > 33 Wood Ave S, 3rd Floor            | jharris@enterprisedb.com
> > Iselin, New Jersey 08830            | http://www.enterprisedb.com/
> >
>
>
>
> --
> Ezequias Rodrigues da Rocha
> http://ezequiasrocha.blogspot.com/
> use Mozilla Firefox: http://br.mozdev.org/firefox/
>



-- 
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use Mozilla Firefox:http://br.mozdev.org/firefox/

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: There is acid without transactions ?
  2007-03-11 16:05 There is acid without transactions ? Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
  2007-03-11 16:35 ` Re: There is acid without transactions ? Jonah H. Harris <jonah.harris@gmail.com>
  2007-03-11 16:39   ` Re: There is acid without transactions ? Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
@ 2007-03-11 20:30     ` Jonah H. Harris <jonah.harris@gmail.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Jonah H. Harris @ 2007-03-11 20:30 UTC (permalink / raw)
  To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>; +Cc: pgsql-sql

On 3/11/07, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
> Perfect. I just don't know what drivers you are talking about (odbc maybe).

As the server no longer supports server-side autocommit, I believe all
of the drivers create an explicit transaction behind the scenes when
the user requests autocommit to be turned off.  That way, the drivers
can allow the user to control the transaction state.

The only mainstream driver I know of which doesn't act this way is
libpq, where there is no way to turn off "autocommit" unless you
explicitly create the transaction yourself with BEGIN.

However, I'm sure each of the driver authors will correct me if I'm wrong :)

-- 
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation            | fax: 732.331.1301
33 Wood Ave S, 3rd Floor            | jharris@enterprisedb.com
Iselin, New Jersey 08830            | http://www.enterprisedb.com/



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: There is acid without transactions ?
  2007-03-11 16:05 There is acid without transactions ? Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
@ 2007-03-11 16:42 ` Michael Fuhr <mike@fuhr.org>
  1 sibling, 0 replies; 6+ messages in thread

From: Michael Fuhr @ 2007-03-11 16:42 UTC (permalink / raw)
  To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>; +Cc: pgsql-sql

On Sun, Mar 11, 2007 at 01:05:12PM -0300, Ezequias Rodrigues da Rocha wrote:
> I would like to know if an statement like.
> 
> Insert into foo values (1,'Brazil');
> 
> Makes an ACID transaction. I am wondered if i must have a  Begin...Commit
> statemnt to garantee my ACIDs transactions.

http://www.postgresql.org/docs/8.2/interactive/tutorial-transactions.html

"PostgreSQL actually treats every SQL statement as being executed
within a transaction.  If you do not issue a BEGIN command, then
each individual statement has an implicit BEGIN and (if successful)
COMMIT wrapped around it."

-- 
Michael Fuhr



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2007-03-11 20:30 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-11 16:05 There is acid without transactions ? Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-11 16:35 ` Jonah H. Harris <jonah.harris@gmail.com>
2007-03-11 16:39   ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-11 16:42     ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-11 20:30     ` Jonah H. Harris <jonah.harris@gmail.com>
2007-03-11 16:42 ` Michael Fuhr <mike@fuhr.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox