rollback question

Started by Hegyvari Krisztianover 24 years ago2 messagesgeneral
Jump to latest
#1Hegyvari Krisztian
Hegyvari.Krisztian@ardents.hu

Greetings,

I have installed Postgresql 7.1.3 with --enable-locale and use it via PHP 4.0.6. My problem is that no kind of rollback works. The following piece of code

logon

insert into sorrend values ("proba");
rollback;

logoff

does not rollback anything but inserts the record into the table. The same applies when one of the queries from a series fail. Everything up to the failed query is committed, nothing is rolled back. I assumed that everything would be rolled back to the last savepoint. I thought that everything between logon and logoff is one transaction. Any ideas why this happens? Am I wrong at one of my assumptions?

Best Regards,

Hegyvari Krisztian

#2Jarmo Paavilainen
netletter@comder.com
In reply to: Hegyvari Krisztian (#1)
Re: rollback question

On Fri, 2001-11-23 at 13:49, Hegyvari Krisztian wrote:

...

logon

insert into sorrend values ("proba");
rollback;

logoff

Add a "begin" before the insert an it should work.

// Jarmo