Re: [ADMIN] Functions

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: [ADMIN] Functions
Дата
Msg-id dcc563d10809151051r79447b28m7468880a55b0a1fa@mail.gmail.com
обсуждение исходный текст
Ответ на Functions  ("c k" <shreeseva.learning@gmail.com>)
Список pgsql-general
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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Joshua Drake
Дата:
Сообщение: Re: Oracle and Postgresql
Следующее
От: "c k"
Дата:
Сообщение: Re: Functions