From: | Alex Pilosov <alex(at)pilosoft(dot)com> |
---|---|
To: | Alan Turner <alan(at)suburbia(dot)com(dot)au> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Transactions inside plpgsql? |
Date: | 2001-01-28 19:54:46 |
Message-ID: | Pine.BSO.4.10.10101281453070.342-100000@spider.pilosoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Basically, answer is: you can't do it, no matter how you slice it, for a
simple reason: postgres doesn't support nested transactions [yet?].
On Sun, 28 Jan 2001, Alan Turner wrote:
> Hi
>
> I've been searching the web/mailing lists/web boards for the answer to a
> question I have regarding postgresql. So far, I haven't found a conclusive
> answer. My apologies in advance if this is a FAQ/stupid question.
>
> My problem is that I would like to write a plpgsql procedure that starts and
> ends transactions. This requires use of the postgres keyword 'begin'. From
> what I can see, the plpgsql parser is wrongly interpreting the begin as a
> plpgsql keyword.
>
> I considered the idea of creating an 'sql' language stored procedure, called
> say begin_work() which in turn makes the 'begin work' statement. While this
> does seem to work, it seems a bit rediculous.
>
> I'm hoping that I've been stupid and missed something obvious :-)
>
> If someone could point me in the direction of the correct documentation,
> I'd be most grateful.
>
> Thanks!
>
> Cheers,
> Alan
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Franck Martin | 2001-01-28 21:58:46 | RE: GUI Interfaces |
Previous Message | Mitch Vincent | 2001-01-28 18:45:54 | Re: varchar => int |