Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2009-05-01, Carlo Stonebanks <stonec.register@xxxxxxxxxxxx> 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?

no.  arbitrary SQL is no problem, 
arbitrary plpgsql must be declared as a function so that it can be
compiled and run. (compiling is automatic)


inside a function execute can be used but not all plpgsql can be
executed (but, again, you can use execute to define and run a new 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.)

You seem to be wanting something like "anonymous functions". postgres 
doesn't do them yet. It may in the future, or they may be incompatible
with the design.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux