From: Doug McNaught <doug@wireboard.com>
To: Daniel Åkerud <zilch@home.se>
Cc: PostgreSQL-general <pgsql-general@postgresql.org>
Subject: Re: Transactions within a function
Date: 06 Jul 2001 09:32:28 -0400
Message-ID: <m37kxm89oz.fsf@belphigor.mcnaught.org> (raw)
References: <000a01c10618$ca7f0bb0$c901a8c0@automatic100>
Daniel Åkerud <zilch@home.se> writes:
> Do the BEGIN and END in a function also indicate that it is done in a
> transaction? Or can you put another BEGIN TRANSACTION; END
> TRANSACTION; in there?
Please don't post in HTML.
A function is always executed within a transaction--either an explicit
one (where the user issues BEGIN TRANSACTION) or the implicit
transaction created by issuing a single SQL statememt. Since PG
doesn't allow nested transactions, you can't have a transaction inside
a function.
-Doug
--
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time... --Dylan
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: doug@wireboard.com, zilch@home.se, pgsql-general@postgresql.org
Subject: Re: Transactions within a function
In-Reply-To: <m37kxm89oz.fsf@belphigor.mcnaught.org>
* 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