Skip site navigation (1) Skip section navigation (2)

Pl/pgSQL & TRANSACTION

From: "Zolof" <zolof(at)club-internet(dot)fr>
To: pgsql-docs(at)postgresql(dot)org
Subject: Pl/pgSQL & TRANSACTION
Date: 2001-01-18 17:16:32
Message-ID: 9478jp$1m25$1@news.tht.net (view raw or flat)
Thread:
Lists: pgsql-docs
This code doesn't work. I use Begin Work to start a transaction but BEGIN is
a PL/pgSQL command so I have a parse error when executing it.

CREATE FUNCTION a () RETURNS int4 AS '
BEGIN
   BEGIN WORK;
   COMMIT WORK;
    return 1;
    END;
' LANGUAGE 'plpgsql';

What's wrong ????




Responses

pgsql-docs by date

Next:From: ZolofDate: 2001-01-18 17:17:27
Subject: pl/pgSQL & transaction
Previous:From: Bruce MomjianDate: 2001-01-17 22:15:38
Subject: Re: docs: syntax.sgml patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group