Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Andrew Sullivan
On Wed, Nov 30, 2005 at 02:58:15PM -0700, Michael Fuhr wrote: Shouldn't that be 8.0 and later? That's when savepoints were introduced. Or are you referring to something else? Doh. Indeed. I was _thinking_ os something else, but not referring to something else. A -- Andrew Sullivan |

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Tim Bunce
On Wed, Nov 30, 2005 at 04:19:18PM -0500, Andrew Sullivan wrote: On Tue, Nov 29, 2005 at 07:44:05PM +, Tim Bunce wrote: On Tue, Nov 29, 2005 at 10:50:01AM -0800, Tyler MacDonald wrote: PostgreSQL, doing a SELECT on a table that doesn't exist poisons the rest of the transaction,

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Jochen Wiedmann
Tim Bunce wrote: No doubt someone will quote the relevant parts. (And no doubt the relevant parts will say it depends :) I believe, the no doubt part is showing your age, aka experience. :-) ---(end of broadcast)--- TIP 6: explain analyze is

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Greg Stark
Jaime Casanova [EMAIL PROTECTED] writes: that is a mis-conception... a transaction *must* be atomic (all or nothing)... the reason some databases act that bad is because they don't support savepoints, and because postgres does it doesn't need that awfulness... Well it's not as bad as all

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Joshua D. Drake
Where is Postgres at with psql using savepoints implicitly to wrap every client command btw? My single biggest pet peeve with Postgres is that setting autocommit off in psql is basically unusable because any typo forces you to start your transaction all over again. Going to have to disagree

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Michael Fuhr
On Thu, Dec 01, 2005 at 01:04:52PM -0500, Greg Stark wrote: Where is Postgres at with psql using savepoints implicitly to wrap every client command btw? My single biggest pet peeve with Postgres is that setting autocommit off in psql is basically unusable because any typo forces you to start

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Tom Lane
Greg Stark [EMAIL PROTECTED] writes: Where is Postgres at with psql using savepoints implicitly to wrap every client command btw? I think that 8.1 psql can be told to do that. regards, tom lane ---(end of broadcast)---

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Bruce Momjian
Tom Lane wrote: Greg Stark [EMAIL PROTECTED] writes: Where is Postgres at with psql using savepoints implicitly to wrap every client command btw? I think that 8.1 psql can be told to do that. Right: \set ON_ERROR_ROLLBACK interactive -- Bruce Momjian|

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-30 Thread Tim Bunce
On Tue, Nov 29, 2005 at 10:50:01AM -0800, Tyler MacDonald wrote: Tim Bunce [EMAIL PROTECTED] wrote: I'll guess that what you're really after is to be able to call begin_work again whilst an earlier begin_work is in effect and have the DBI keep a counter of how deeply nested the begin_work

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-30 Thread Andrew Sullivan
On Tue, Nov 29, 2005 at 07:44:05PM +, Tim Bunce wrote: On Tue, Nov 29, 2005 at 10:50:01AM -0800, Tyler MacDonald wrote: PostgreSQL, doing a SELECT on a table that doesn't exist poisons the rest of the transaction, whereas under MySQL and SQLite2 the transaction is allowed to continue.

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-30 Thread Tyler MacDonald
Andrew Sullivan [EMAIL PROTECTED] wrote: The inconvenience I'll grant, but the non-standard claim I think needs some justification. When the database encounters an error in a transaction, it is supposed to report an error. An error in a transaction causes the whole transaction to fail:

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-30 Thread Jaime Casanova
On 11/30/05, Tyler MacDonald [EMAIL PROTECTED] wrote: Andrew Sullivan [EMAIL PROTECTED] wrote: The inconvenience I'll grant, but the non-standard claim I think needs some justification. When the database encounters an error in a transaction, it is supposed to report an error. An error in

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-30 Thread Michael Fuhr
On Wed, Nov 30, 2005 at 04:19:18PM -0500, Andrew Sullivan wrote: But it's worth knowing that in Pg 8.1 and later, you can wrap such things in a subtransaction and get out of it that way. Shouldn't that be 8.0 and later? That's when savepoints were introduced. Or are you referring to something

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-30 Thread Tyler MacDonald
Jaime Casanova [EMAIL PROTECTED] wrote: Either way the end result is that some database drivers poison a transaction if there's any error, others are selective about which errors are fatal and which are not, and still others just don't care at all. that is a mis-conception... a

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-29 Thread Tyler MacDonald
Tim Bunce [EMAIL PROTECTED] wrote: I'll guess that what you're really after is to be able to call begin_work again whilst an earlier begin_work is in effect and have the DBI keep a counter of how deeply nested the begin_work calls are. Then commit would decrement the counter and only commit at