Re: Any way to execute ad-hoc pl/pgsql? - Mailing list pgsql-general

From Dave Page
Subject Re: Any way to execute ad-hoc pl/pgsql?
Date
Msg-id 937d27e10905010230r39582e97vf8b74bbc80e19790@mail.gmail.com
Whole thread Raw
In response to Any way to execute ad-hoc pl/pgsql?  ("Carlo Stonebanks" <stonec.register@sympatico.ca>)
List pgsql-general
On Fri, May 1, 2009 at 6:25 AM, Carlo Stonebanks
<stonec.register@sympatico.ca> wrote:
> One of our developers asked me, "is there any way to execute arbitrary
> plpgsql"? By that I beleive he means: is there some way to execute ad-hoc
> pl/pgsql code without creating a stored procedure or a function?
>
> I believe MS SQL Server can do this - has any one heard of some sort of
> command shell to do this for PG?
>
> (I suppose one possibility would be something that created a temporary
> stored proc to execute the code, then cleaned up after itself.)

Sounds like you need anonymous blocks, which no, PostgreSQL doesn't support.

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

pgsql-general by date:

Previous
From: Dennis Brakhane
Date:
Subject: Re: Understand this error
Next
From: DaNieL
Date:
Subject: ERROR: syntax error at or near "IF"... why?