Search Postgresql Archives

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

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

 



Carlo Stonebanks wrote:

> (I suppose one possibility would be something that created a temporary
> stored proc to execute the code, then cleaned up after itself.)

Yep, that's what I do -

CREATE FUNCTION fred() RETURNS blah AS $$
$$ LANGUAGE 'plpgsql';

SELECT fred();

DROP FUNCTION fred();

I've only needed it a couple of times in really complex data conversion
and import routines, though.

It'd be really quite nice to have CREATE TEMPORARY FUNCTION even if Pg
didn't have true anonymous blocks (which IMO encourage unnecessary
procedural style coding).

--
Craig Ringer

-- 
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