Search Postgresql Archives

Re: Unable to ALTER table after SELECT data from table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



on 12/10/07 12:15 PM, Thomas-Carsten.Franke@xxxxxxxxx purportedly said:

> To work around this I add an dbCon.rollBack() after select statement
> above in good and in bad times. After that ALTER works.
> Can someone explain me why I need this rollback ?

You only need the rollback when the SELECT statement fails. When an error
occurs within a transaction, the transaction is aborted but not rolled back.
There are likely reasons why the rollback isn't automatic, but I don't know
them.

Your choice is either to run the commands in an "autocommit" mode or, as you
are doing, rollback (or commit, if there was no error) after the SELECT.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux