Search Postgresql Archives

Re: Create temporary function

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

 



Steve Crawford <scrawford@xxxxxxxxxxxxxxxxxxxx> writes:
> I have recently run across situations that might benefit from the 
> ability to create a temporary function.

You can do that today, as long as you don't mind schema-qualifying
uses of the function:

regression=# create function pg_temp.tfunc(int) returns int as 
regression-# $$ select $1 + 1 $$ language sql;
CREATE FUNCTION
regression=# select pg_temp.tfunc(42);
 tfunc 
-------
    43
(1 row)

Without the qualification, the function won't be found, even if
you put pg_temp into your search path explicitly.  That's intentional
because of the risk of trojan horses ...

			regards, tom lane


[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