pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Joseph Syjuco <joseph@asti.dost.gov.ph>
To: pgsql-sql@postgresql.org
Subject: Re: transaction in plpgsql
Date: Fri, 28 Jun 2002 08:36:12 -0700
Message-ID: <web-1560422@davinci.ethosmedia.com> (raw)
In-Reply-To: <1025295705.13808.9.camel@Askr>

Joseph,

> so does that mean that if i call function 2 from function 1 and
> function
> 2 fails than function 1 and function 2 rolls back
> 
> hopefully the answer is yes

That's correct.  To diagram:

Function 1 calls
 |
V
Function 2 calls
 |
V
Function 3, which fails
 |
V
Function 3 is rolled back
 |
V
Function 2 is rolled back
 |
V
Function 1 is rolled back


While this automatic tranactioning and "All succeed or fail together"
functionality is sometimes useful, its often also a major annoyance.
    Changing it is on the "todo" list, but poses some major technical
challenges.

-Josh Berkus





view thread (4+ messages)  latest in thread

Message-ID: <web-1560422@davinci.ethosmedia.com>
Permalink:  ../web-1560422@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-1560422@davinci.ethosmedia.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, joseph@asti.dost.gov.ph
  Subject: Re: transaction in plpgsql
  In-Reply-To: <web-1560422@davinci.ethosmedia.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox