From: Scott Marlowe <scott.marlowe@gmail.com>
To: c k <shreeseva.learning@gmail.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: Functions
Date: Mon, 15 Sep 2008 11:51:07 -0600
Message-ID: <dcc563d10809151051r79447b28m7468880a55b0a1fa@mail.gmail.com> (raw)
In-Reply-To: <d8e7a1e30809150955v32f01897wa900261ac86af34b@mail.gmail.com>
References: <d8e7a1e30809150955v32f01897wa900261ac86af34b@mail.gmail.com>
On Mon, Sep 15, 2008 at 10:55 AM, c k <shreeseva.learning@gmail.com> wrote:
> Dear PG members,
> I want to know that does begin and end in plpgsql are related to begin
> transactions and commit? if yes/no how?
No. a plpgsql function is a transaction in its entirety. If called
within a transaction it inherits the parent transaction.
>If I start to execute a function of
> multiple statements does PG commits each transaction within a function, or
> whole function as a transaction.
Whole thing, all or nothing.
> Also if first statement makes inserts/updates a row, does it automatically
> available to that particular function execution only or to any other
> instances of same function?
To that function only. Until commit no one else should see the change.
> Please give the details.
> In my system, function are extensively used and cab called by different
> clients as ODBC, JDBC and others.
How called isn't all that critical, unless you've set some kind of
autocommit flag or something.
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-admin@postgresql.org
Cc: scott.marlowe@gmail.com, shreeseva.learning@gmail.com, pgsql-general@postgresql.org
Subject: Re: Functions
In-Reply-To: <dcc563d10809151051r79447b28m7468880a55b0a1fa@mail.gmail.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