From: | "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com> |
---|---|
To: | jnasby(at)pervasive(dot)com, pgman(at)candle(dot)pha(dot)pa(dot)us |
Cc: | hannu(at)skype(dot)net, Ashok(dot)Agrawal(at)Sun(dot)COM, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Oracle PL/SQL Anonymous block equivalent in postgres |
Date: | 2005-12-27 21:44:25 |
Message-ID: | BAY20-F181BA7E63C93ED9E8F901DF9370@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>Of course having the ability to execute arbitrary plpgsql in .sql
>scripts would be handy in some cases as well, though as others pointed
>out there are alternatives.
I don't know if it's possible. PL/pgSQL parser live in different context
than SQL parser and PostgreSQL supports more languages than one. These needs
different syntax, maybe:
EXECUTE CODE (integer, integer) RETURNS integer AS $$
DECLARE c integer = 10;
BEGIN
RETURN $1 + $2 + c;
END;
$$ LANGUAGE plppgsql USING(10,20);
we can use plplgsql compiler, and only use different memory context. It's
maybe better solution than temp functions.
Regards
Pavel Stehule
_________________________________________________________________
Najdete si svou lasku a nove pratele na Match.com. http://www.msn.cz/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-12-27 22:22:56 | Re: Possible savepoint bug |
Previous Message | Tom Lane | 2005-12-27 20:51:29 | Re: Possible savepoint bug |