Pl/pgSQL & TRANSACTION - Mailing list pgsql-docs

From Zolof
Subject Pl/pgSQL & TRANSACTION
Date
Msg-id 9478jp$1m25$1@news.tht.net
Whole thread Raw
Responses Re: Pl/pgSQL & TRANSACTION  ("Robert B. Easter" <reaster@comptechnews.com>)
List 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 ????




pgsql-docs by date:

Previous
From: anson
Date:
Subject: column type
Next
From: "Robert B. Easter"
Date:
Subject: Re: Pl/pgSQL & TRANSACTION