Re: Transactions within a function - Mailing list pgsql-general

From Jan Wieck
Subject Re: Transactions within a function
Date
Msg-id 200107061323.f66DNaJ21413@jupiter.us.greatbridge.com
Whole thread Raw
In response to Transactions within a function  (Daniel Åkerud <zilch@home.se>)
List pgsql-general
Daniel Åkerud wrote:
> 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?

    The  BEGIN  and  END  keywords in PL/pgSQL have absolutely no
    transactional meaning. They group statements into blocks with
    the  possibility  of  named blocks using the <<label>> syntax
    and then beeing able to EXIT  up  multiple  block  levels  at
    once.

    Since  every  SQL statement sent to the backend outside of an
    explicit transaction block has it's own implicit  transaction
    and   we   don't   have  subtransactions  yet,  there  is  no
    possibility for transaction control inside of functions.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


pgsql-general by date:

Previous
From: wsheldah@lexmark.com
Date:
Subject: Re: PostgreSQL perl / libpq.so.2 problem - again :(
Next
From: "Brent R. Matzelle"
Date:
Subject: Re: which Python interface