Search Postgresql Archives

TX semantics backward compatibility

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

 



Hi,

We've got a product which supposedly supports the major RDBMSs including PostgreSQL. We tested it so far only with PostgreSQL 7.2 and found no problem. Now, it turned out that it does not work with more recent versions (certainly not with 8.0). The problem is with the kind of code where we test the existence of a table in a transaction with:

select count(*) from doesitexist where 1 = 2;

If there is an error, we assume that the table does not exists and go ahead without rollback and commit. When later we issue an SQL statement again, we get the error message you probably all know.

Of course, we rely on we-do-not-exactly-now-how-many places on a transaction still being usable after a (read-only) statement level error.

Is it correct that the behaviour in this regard was different with earlier versions (like with 7.2)? (I.e. a statement level error left you with a still usable transaction?) Or have we introduced some subtle change into our code (or our testing environment) which makes the difference? Or may something have changed in the client driver we use (JDBC)? Is there a simple way to revert to the old behaviour in this regard?

Many thanks in advance,

Peter

---------------------------(end of broadcast)---------------------------
TIP 7: 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