Err. compiling func. with SET TRANS...

From: otisg(at)ivillage(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Err. compiling func. with SET TRANS...
Date: 2002-02-27 22:39:24
Message-ID: 20020227223924.10458.cpmta@c006.snv.cp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I'm having trouble getting functions with SET TRANSACTION ISOLATION ... to parse.

This is the error I'm getting (example function below the error):

=> select simple_fun();
NOTICE: plpgsql: ERROR during compile of simple_fun near line 3
ERROR:parse error at or near ";"

This is the simple_fun function that is causing the above error:

CREATE FUNCTION simple_fun() RETURNS INTEGER AS '
BEGIN
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
BEGIN;
SELECT 1;
END;
RETURN 1;
END;
' LANGUAGE 'plpgsql';

This is as simple as it gets.
I think my syntax is correct (I checked Practical PostgreSQL
book as well as a number of 7.2 PDF documents, etc.).

Am I missing a secret ingredient here?

Thank you,
Otis

_________________________________________________________________
iVillage.com: Solutions for Your Life
Check out the most exciting women's community on the Web
http://www.ivillage.com

Browse pgsql-general by date

  From Date Subject
Next Message Arguile 2002-02-27 23:21:34 Re: Drawing databases
Previous Message Eduardo Jos Hernndez Cisneros 2002-02-27 22:34:06 pgaccess