Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Hiroshi Inoue
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: 1 - All SETs are rolled back in aborted transaction 2 - SETs are ignored after transaction abort 3 - All SETs are honored in aborted transaction ? - Have SETs vary in behavior depending on variable My

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Bruce Momjian
Hiroshi Inoue wrote: I'd be willing to consider making the behavior variable-specific if anyone can identify particular variables that need to behave differently. But overall I think it's better that the behavior be consistent --- so you'll need a good argument to convince me that

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Thomas Lockhart
OK, would people please vote on how to handle SET in an aborted transaction? at the end, should 'x' equal: 1 - All SETs are rolled back in aborted transaction 2 - SETs are ignored after transaction abort 3 - All SETs are honored in aborted transaction ? -

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Tom Lane
Thomas Lockhart [EMAIL PROTECTED] writes: Let me give you some examples. We might someday have nested transactions, or transactions which can be resumed from the point of failure. We *might* want to be able to affect recovery behaviors, and we *might* want to do so with something like

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Vince Vielhaber
On Wed, 24 Apr 2002, Michael Loftis wrote: Vote number 1 -- ROLL BACK I agree.. Number 1 - ROLL BACK Bruce Momjian wrote: OK, would people please vote on how to handle SET in an aborted transaction? This vote will allow us to resolve the issue and move forward if needed. In the

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Hiroshi Inoue
Bruce Momjian wrote: OK, would people please vote on how to handle SET in an aborted transaction? This vote will allow us to resolve the issue and move forward if needed. In the case of: SET x=1; BEGIN; SET x=2; query_that_aborts_transaction;

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Hiroshi Inoue
Tom Lane wrote: Right offhand, I am not seeing anything here for which there's a compelling case not to roll it back on error. In fact, I have yet to hear *any* plausible example of a variable that we would really seriously want not to roll back on error. Honetsly I don't understand

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Jan Wieck
Hiroshi Inoue wrote: Tom Lane wrote: Right offhand, I am not seeing anything here for which there's a compelling case not to roll it back on error. In fact, I have yet to hear *any* plausible example of a variable that we would really seriously want not to roll back on error.

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Hiroshi Inoue
Jan Wieck wrote: Hiroshi Inoue wrote: Tom Lane wrote: Right offhand, I am not seeing anything here for which there's a compelling case not to roll it back on error. In fact, I have yet to hear *any* plausible example of a variable that we would really seriously want not to

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Tom Lane
Hiroshi Inoue [EMAIL PROTECTED] writes: Honetsly I don't understand what kind of example you expect. How about the following ? [The curren schema is schema1] begin; create schema foo; set search_path = foo; create table t1 (); . [error occurs]

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Michael Loftis
Hiroshi Inoue wrote: What's wrong with it ? The insert command after *rollback* would fail. It seems the right thing to me. Otherwise the insert command would try to append the data of the table t1 to itself. The insert command is for copying schema1.t1 to foo.t1 in case the previous create

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Hiroshi Inoue
Michael Loftis wrote: Hiroshi Inoue wrote: What's wrong with it ? The insert command after *rollback* would fail. It seems the right thing to me. Otherwise the insert command would try to append the data of the table t1 to itself. The insert command is for copying schema1.t1 to foo.t1 in

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Bruce Momjian
Hiroshi Inoue wrote: Michael Loftis wrote: Hiroshi Inoue wrote: What's wrong with it ? The insert command after *rollback* would fail. It seems the right thing to me. Otherwise the insert command would try to append the data of the table t1 to itself. The insert command is for

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Michael Loftis
Hiroshi Inoue wrote: Michael Loftis wrote: Hiroshi Inoue wrote: What's wrong with it ? The insert command after *rollback* would fail. It seems the right thing to me. Otherwise the insert command would try to append the data of the table t1 to itself. The insert command is for copying

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Jan Wieck
Hiroshi Inoue wrote: Sure should it! You gave an example for the need to roll back, because otherwise you would end up with an invalid search path foo. What's wrong with it ? The insert command after *rollback* would fail. It seems the right thing to me.

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Michael Loftis
Bruce Momjian wrote: Hiroshi, we need a psql solution too. People are feeding query files into psql all the time and we should have an appropriate behavior for them. I now understand your point that from a ODBC perspective, you may not want SETs rolled back and you would rather ODBC handle

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Hiroshi Inoue
Michael Loftis wrote: Hiroshi Inoue wrote: Where's the restriction that all objects in a schema must be created in an transaction ? Each user has his reason and would need various kind of command call sequence. What I've mainly insisted is what to do with errors is users' responsibilty

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Hiroshi Inoue
Jan Wieck wrote: Hiroshi Inoue wrote: Sure should it! You gave an example for the need to roll back, because otherwise you would end up with an invalid search path "foo". What's wrong with it ? The insert command after *rollback* would fail. It seems the

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Hiroshi Inoue
Bruce Momjian wrote: Hiroshi Inoue wrote: Hiroshi, we need a psql solution too. People are feeding query files into psql all the time and we should have an appropriate behavior for them. What are you expecting for psql e.g. the following wrong(?) example ? [The curren schema is

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Hiroshi Inoue
Michael Loftis wrote: Bruce Momjian wrote: Hiroshi, we need a psql solution too. People are feeding query files into psql all the time and we should have an appropriate behavior for them. I now understand your point that from a ODBC perspective, you may not want SETs rolled back and

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Bruce Momjian
Hiroshi Inoue wrote: Bruce Momjian wrote: Hiroshi Inoue wrote: Hiroshi, we need a psql solution too. People are feeding query files into psql all the time and we should have an appropriate behavior for them. What are you expecting for psql e.g. the following wrong(?) example ?

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Hiroshi Inoue
Bruce Momjian wrote: Hiroshi Inoue wrote: What are you expecting for psql e.g. the following wrong(?) example ? [The curren schema is schema1] begin; create schema foo; set search_path = foo; create table t1 (); [error occurs]

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Bruce Momjian
Hiroshi Inoue wrote: Bruce Momjian wrote: Hiroshi Inoue wrote: What are you expecting for psql e.g. the following wrong(?) example ? [The curren schema is schema1] begin; create schema foo; set search_path = foo; create table

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-24 Thread Hiroshi Inoue
Bruce Momjian wrote: What are you expecting for psql e.g. the following wrong(?) example ? [The curren schema is schema1] begin; create schema foo; set search_path = foo; create table t1 (); [error occurs]

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-23 Thread Bradley McLean
* Bruce Momjian ([EMAIL PROTECTED]) [020423 12:30]: 1 - All SETs are rolled back in aborted transaction 2 - SETs are ignored after transaction abort 3 - All SETs are honored in aborted transaction ? - Have SETs vary in behavior depending on variable Our

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-23 Thread Bruce Momjian
Bradley McLean wrote: * Bruce Momjian ([EMAIL PROTECTED]) [020423 12:30]: 1 - All SETs are rolled back in aborted transaction 2 - SETs are ignored after transaction abort 3 - All SETs are honored in aborted transaction ? - Have SETs vary in behavior depending on

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-23 Thread Jan Wieck
1 SET should follow transaction semantics and rollback. Jan Bruce Momjian wrote: OK, would people please vote on how to handle SET in an aborted transaction? This vote will allow us to resolve the issue and move forward if needed. In the case of: SET x=1;

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-23 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: 1 - All SETs are rolled back in aborted transaction 2 - SETs are ignored after transaction abort 3 - All SETs are honored in aborted transaction ? - Have SETs vary in behavior depending on variable My vote is 1 - roll back all

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-23 Thread Lamar Owen
On Tuesday 23 April 2002 04:27 pm, Bruce Momjian wrote: OK, would people please vote on how to handle SET in an aborted transaction? This vote will allow us to resolve the issue and move forward if needed. at the end, should 'x' equal: 1 - All SETs are rolled back in aborted

Re: [HACKERS] Vote on SET in aborted transaction

2002-04-23 Thread Joe Conway
Bruce Momjian wrote: OK, would people please vote on how to handle SET in an aborted transaction? This vote will allow us to resolve the issue and move forward if needed. In the case of: SET x=1; BEGIN; SET x=2; query_that_aborts_transaction; SET x=3;