Re: Help with BEGIN/COMMIT within a transaction

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Bhavesh Jardosh <perltastic(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Help with BEGIN/COMMIT within a transaction
Date: 2003-08-02 13:42:05
Message-ID: m3r844mb0y.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bhavesh Jardosh <perltastic(at)yahoo(dot)com> writes:

> I aplogoize in the first place, if this is a silly question. But as silly as it
> sounds it has been giving me a hard time.
>
> I need to use BEGIN/COMMIT within a stored procedure and almost all the syntax
> (e.g. BEGIN ... COMMIT, START ... COMMIT, BEGIN WORK ... COMMIT WORK etc.)
> gives me an error when I try to execute (not when I compile) the stored
> procedure.

You can't currently do this. Calls to functions are already inside a
(possibly implicit) transaction, so calling BEGIN inside a function
would have to start a subtransaction, which PG doesn't currently
support. There is some possibility that this feature will be in 7.5,
but that won't be coming out anmytime soon.

-Doug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-08-02 14:50:31 Re: plPHP -- sort of an announcement.. but not commercial
Previous Message Francois Suter 2003-08-02 11:55:55 PostgreSQL consulting company in France or Europe?