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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-docs by date

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