From: | Alban Hertroys <alban(at)magproductions(dot)nl> |
---|---|
To: | Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com> |
Cc: | Michael Fuhr <mike(at)fuhr(dot)org>, Ralf Wiebicke <ralf(dot)wiebicke(at)exedio(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: in failed sql transaction |
Date: | 2006-09-25 11:43:28 |
Message-ID: | 4517C0E0.6080406@magproductions.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Gurjeet Singh wrote:
> > All other databases I used up to now just ignore the statement
> violating the
> > constraint, but leave the transaction intact.
>
> Which databases behave that way? Does COMMIT succeed even if some
> statements failed?
>
>
> Oracle, for one, behaves that way... Yes, COMMIT does succeed even if
> some statement(s) threw errors.
Actually, Oracle implicitly COMMIT's all open transactions if someone
performs a DDL statement on the table (or even the same schema?).
What other databases do is not necessarily correct[1]. In this case
PostgreSQL does the right thing; something went wrong, queries after the
error may very well depend on that data - you can't rely on the current
state. And it's what the SQL specs say too, of course...
[1] I'm not trying to imply that what PostgreSQL does is (in general).
--
Alban Hertroys
alban(at)magproductions(dot)nl
magproductions b.v.
T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede
// Integrate Your World //
From | Date | Subject | |
---|---|---|---|
Next Message | Bo Lorentsen | 2006-09-25 11:48:38 | Re: Replication and PITR |
Previous Message | Karsten Hilbert | 2006-09-25 10:04:57 | Re: in failed sql transaction |