Skip site navigation (1) Skip section navigation (2)

Re: Actions requiring commit

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Lee Horowitz <leeh(at)panix(dot)com>
Cc: Lee <lee(at)jamtoday(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Actions requiring commit
Date: 2010-02-15 02:32:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Mon, Feb 15, 2010 at 1:50 AM, Lee Horowitz <leeh(at)panix(dot)com> wrote:
> Does that go for pl/pgsql as well?
> If I call a pl/pgsql procedure from the psql  command line (or from
> another pl/pgsql procedure?) will commits in the called procedure cause
> commit in the calling procedure as well, or will the caller and callee
> have in effect different "threads" or sessions so that their respective
> commits are separated?

pl/pgsql functions can't commit. Any database modifications are
committed at the end of the transaction. We currently don't have
"stored procedures" which live outside of transactions and can start
and commit transactions on their own, only functions which live
entirely within one transaction.


In response to


pgsql-novice by date

Next:From: John DeSoiDate: 2010-02-15 03:39:07
Subject: Re: Function
Previous:From: Lee HorowitzDate: 2010-02-15 01:50:31
Subject: Re: Actions requiring commit

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group