Search Postgresql Archives

Re: Moving to postgresql and some ignorant questions

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

 



> If you issue a BEGIN then nothing gets committed until you issue a COMMIT. If
> anything happens in the meantime then everything you've done since the BEGIN
> disappears.
>



There are some cases where I would like to bunch queries into a
transaction purely for speed purposes, but they're not interdependent
for integrity. E.g.,

  BEGIN TRANSACTION;
  UPDATE1;
  UPDATE2;
  UPDATE3;
  COMMIT;

If UPDATE2 fails because it, say, violates a foreign key constraint,
then so be it. I want UPDATE3 to go ahead. Is this not possible, or is
there an option I can use to do these kind of independent-query
transactions?

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[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