Обсуждение: There is acid without transactions ?
Hi list,<br /><br />I would like to know if an statement like.<br /><br />Insert into foo values (1,'Brazil');<br /><br />Makesan ACID transaction. I am wondered if i must have a Begin...Commit statemnt to garantee my ACIDs transactions. <br/><br />Regards ,<br clear="all" /><br />-- <br />Ezequias Rodrigues da Rocha<br /><a href="http://ezequiasrocha.blogspot.com/">http://ezequiasrocha.blogspot.com/</a><br/>use Mozilla Firefox:<a href="http://br.mozdev.org/firefox/">http://br.mozdev.org/firefox/</a>
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/
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
--
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use Mozilla Firefox: http://br.mozdev.org/firefox/
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/
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
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
--
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use Mozilla Firefox: http://br.mozdev.org/firefox/
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 ?
Ezequias2007/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/
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/