Re: AW: [HACKERS] Begin statement again

From: jwieck(at)debis(dot)com (Jan Wieck)
To: vadim(at)sable(dot)krasnoyarsk(dot)su (Vadim B(dot) Mikheev)
Cc: pgsql-hackers(at)postgreSQL(dot)org (PostgreSQL HACKERS)
Subject: Re: AW: [HACKERS] Begin statement again
Date: 1998-03-25 09:36:36
Message-ID: m0yHmbt-000BFRC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Vadim wrote:
>
> 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.

What exactly is planned for this?

Will it be possible to begin/commit a subtransaction so that
updates done before and after it could still get rolled back
while things inside remain persistent?

Or would it be possible to commit up to now and resume (maybe
a new transaction)?

What would the syntax be for these statements, or must the
function/trigger call special functions in the backend on the
C level?

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message SC Altex Impex SRL 1998-03-25 09:45:57 my postgresql moves to a Digital server, but...
Previous Message Zeugswetter Andreas 1998-03-25 09:32:04 Re: [HACKERS] Begin statement again