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(dot)pgsql-general(at)postgresql(dot)org(dot)pgsql-interfaces(at)postgresql(dot)org(dot)pgsql-sql(at)postgresql(dot)org
Subject: pl/pgSQL & transaction
Date: 2001-01-18 17:17:27
Message-ID: 9478lh$1m2r$2@news.tht.net (view raw or flat)
Thread:
Lists: pgsql-docspgsql-generalpgsql-interfacespgsql-sql
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: Peter EisentrautDate: 2001-01-18 23:48:54
Subject: Re: docs: syntax.sgml patch
Previous:From: ZolofDate: 2001-01-18 17:16:32
Subject: Pl/pgSQL & TRANSACTION

pgsql-general by date

Next:From: Stephan SzaboDate: 2001-01-18 17:27:12
Subject: Re: Tuning queries and distinct behaviour
Previous:From: Gordan BobicDate: 2001-01-18 17:16:33
Subject: Another optimizer question

pgsql-interfaces by date

Next:From: Peter T MountDate: 2001-01-18 17:44:08
Subject: JDBC: New updates to CVS
Previous:From: Craig BrozefskyDate: 2001-01-18 16:01:37
Subject: Re: issues with libpg interface

pgsql-sql by date

Next:From: Adam HaberlachDate: 2001-01-18 17:37:13
Subject: Re: Help with query. (*)
Previous:From: guardDate: 2001-01-18 15:00:40
Subject: Distributed database ?

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