Bruce Momjian <[EMAIL PROTECTED]> writes: > Oliver Elphick wrote: >> On Tue, 2004-10-26 at 21:42 -0400, Bruce Momjian wrote: >>> test=> begin; >>> BEGIN >>> test=> commit; >>> COMMIT >>> test=> commit; >>> WARNING: there is no transaction in progress >>> ROLLBACK >> >> It's still a misleading message; in those circumstances, how about >> returning "NO ACTION" instead?
> Uh, it took a lot of discussion to agree on ROLLBACK. It would take > even more discussion to add a new tag return value. I don't care for "NO ACTION" either. However, the prior discussion had to do with what to echo in the case that you are saying COMMIT in a failed transaction. I don't think anyone thought about this particular corner case, viz COMMIT outside any transaction. I think you could make a reasonable argument that the tag should remain COMMIT for this case, since we do not consider it an error. On the other hand, it's also a pretty minor issue, and if it turns out to require a lot of code rejiggering to make it do that, I'd not think it worthwhile. Comments? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend