Index: pgadmin/include/utils/sysSettings.h
===================================================================
--- pgadmin/include/utils/sysSettings.h	(révision 8016)
+++ pgadmin/include/utils/sysSettings.h	(copie de travail)
@@ -110,6 +110,8 @@
 	void SetIndentSpaces(const long newval) { Write(wxT("IndentSpaces"), newval); }
     bool GetIndicateNull() const { bool b; Read(wxT("frmQuery/IndicateNull"), &b, false); return b; }
 	void SetIndicateNull(const bool newval) { Write(wxT("frmQuery/IndicateNull"), newval); }
+    bool GetDisableAutoRollback() const { bool b; Read(wxT("frmQuery/DisableAutoRollback"), &b, false); return b; }
+	void SetDisableAutoRollback(const bool newval) { Write(wxT("frmQuery/DisableAutoRollback"), newval); }
     bool GetUnicodeFile() const { bool b; Read(wxT("WriteUnicodeFile"), &b, true); return b; }
 	void SetUnicodeFile(const bool newval) { Write(wxT("WriteUnicodeFile"), newval); }
     wxFont GetSystemFont();
Index: pgadmin/frm/frmOptions.cpp
===================================================================
--- pgadmin/frm/frmOptions.cpp	(révision 8016)
+++ pgadmin/frm/frmOptions.cpp	(copie de travail)
@@ -56,6 +56,7 @@
 #define cbCopySeparator				CTRL_COMBOBOX("cbCopySeparator")
 #define chkStickySql                CTRL_CHECKBOX("chkStickySql")
 #define chkIndicateNull             CTRL_CHECKBOX("chkIndicateNull")
+#define chkDisableAutoRollback      CTRL_CHECKBOX("chkDisableAutoRollback")
 #define chkDoubleClickProperties    CTRL_CHECKBOX("chkDoubleClickProperties")
 #define cbLanguage                  CTRL_COMBOBOX("cbLanguage")
 #define txtSqlFont                  CTRL_TEXT("txtSqlFont")
@@ -126,6 +127,7 @@
 
     chkStickySql->SetValue(settings->GetStickySql());
     chkIndicateNull->SetValue(settings->GetIndicateNull());
+    chkDisableAutoRollback->SetValue(settings->GetDisableAutoRollback());
     chkDoubleClickProperties->SetValue(settings->GetDoubleClickProperties());
 
     txtPgHelpPath->SetValue(settings->GetPgHelpPath());
@@ -391,6 +393,7 @@
 
     settings->SetStickySql(chkStickySql->GetValue());
     settings->SetIndicateNull(chkIndicateNull->GetValue());
+    settings->SetDisableAutoRollback(chkDisableAutoRollback->GetValue());
     settings->SetDoubleClickProperties(chkDoubleClickProperties->GetValue());
     settings->SetUnicodeFile(chkUnicodeFile->GetValue());
     settings->SetSystemFont(currentFont);
Index: pgadmin/frm/frmQuery.cpp
===================================================================
--- pgadmin/frm/frmQuery.cpp	(révision 8016)
+++ pgadmin/frm/frmQuery.cpp	(copie de travail)
@@ -47,6 +47,7 @@
 #include "schema/pgServer.h"
 #include "utils/favourites.h"
 #include "utils/sysLogger.h"
+#include "utils/sysSettings.h"
 #include "utils/utffile.h"
 #include "pgscript/pgsApplication.h"
 
@@ -2352,7 +2353,7 @@
     msgHistory->ShowPosition(0);
 
     // If the transaction aborted for some reason, issue a rollback to cleanup.
-    if (conn->GetTxStatus() == PGCONN_TXSTATUS_INERROR)
+    if (!settings->GetDisableAutoRollback() && conn->GetTxStatus() == PGCONN_TXSTATUS_INERROR)
         conn->ExecuteVoid(wxT("ROLLBACK;"));
 
     setTools(false);
Index: pgadmin/ui/frmOptions.xrc
===================================================================
--- pgadmin/ui/frmOptions.xrc	(révision 8016)
+++ pgadmin/ui/frmOptions.xrc	(copie de travail)
@@ -308,6 +308,16 @@
             <pos>175,157d</pos>
             <size>226,12d</size>
           </object>
+          <object class="wxStaticText" name="stDisableAutoRollback">
+            <label>Disable Auto ROLLBACK</label>
+            <pos>5,172d</pos>
+          </object>
+          <object class="wxCheckBox" name="chkDisableAutoRollback">
+            <label></label>
+            <checked>0</checked>
+            <pos>175,172d</pos>
+            <size>226,12d</size>
+          </object>
         </object>
       </object>
       <object class="notebookpage">
@@ -390,4 +400,4 @@
       <tooltip>Cancel any changes and close the dialogue.</tooltip>
     </object>
   </object>
-</resource>
\ No newline at end of file
+</resource>
