Search Postgresql Archives

Re: in failed sql transaction

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

 



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@xxxxxxxxxxxxxxxxx

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 //


[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