Re: AW: [HACKERS] Begin statement again - Mailing list pgsql-hackers

From Vadim B. Mikheev
Subject Re: AW: [HACKERS] Begin statement again
Date
Msg-id 35187D70.78E97527@sable.krasnoyarsk.su
Whole thread Raw
In response to Re: AW: [HACKERS] Begin statement again  (jwieck@debis.com (Jan Wieck))
Responses Re: AW: [HACKERS] Begin statement again
Re: AW: [HACKERS] Begin statement again
List pgsql-hackers
Jan Wieck wrote:
>
> Andreas wrote:
> >
> > I think we should depreciate the BEGIN/END keywords in SQL to allow them
> > to be used for the new PL/SQL. So definitely leave them out of ecpg now.
> > Only accept BEGIN WORK and BEGIN TRANSACTION. (do a sequence of commit work; begin work)
> > BTW.: why is a transaction always open ? A lot of programs would never need a
> > transaction. Is it because of cursors ?
>
>     BEGIN/END  in  PL/SQL and PL/pgSQL doesn't mean transactions!
>     It's just to group statements to a block. You  cannot  commit
>     something inside a PostgreSQL function. All changes made by a
>     function are covered by the  statements  transaction  or  the
>     upper transaction block.

This will be changed - there is a way to implement nested transaction!
And so, some day we will need in something to start/end transaction
block inside functions.

Vadim

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] char types gone.
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Optimizer fails?