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

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Carlo Stonebanks <stonec(dot)register(at)sympatico(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Any way to execute ad-hoc pl/pgsql?
Date: 2009-05-01 09:30:02
Message-ID: 937d27e10905010230r39582e97vf8b74bbc80e19790@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, May 1, 2009 at 6:25 AM, Carlo Stonebanks
<stonec(dot)register(at)sympatico(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2009-05-01 10:06:18 Re: Do TEMP Tables have an OID? Can this be a problem if used too frequently?
Previous Message Dennis Brakhane 2009-05-01 08:40:47 Re: Understand this error