Re: temporary functions (and other object types) - Mailing list pgsql-hackers

From Robert Haas
Subject Re: temporary functions (and other object types)
Date
Msg-id AANLkTi=h6778spTZqfe-iF0ggXXA7UEaTLKZAEzT-iAO@mail.gmail.com
Whole thread Raw
In response to Re: temporary functions (and other object types)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: temporary functions (and other object types)
List pgsql-hackers
On Fri, Nov 5, 2010 at 4:02 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
>> A customer of ours has the need for temporary functions.
>
> You can do that now:
>
> regression=# create function pg_temp.foo(f1 int) returns int
> regression-# as 'select $1+1' language sql;
> CREATE FUNCTION
> regression=# select pg_temp.foo(1);
>  foo
> -----
>   2
> (1 row)
>
> You do have to qualify the name explicitly:
>
> regression=# select foo(1);
> ERROR:  function foo(integer) does not exist
>
> The latter is an intentional security feature and will not get changed.

I see that there could be a problem here with SECURITY DEFINER
functions, but I'm not clear whether it goes beyond that?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: timestamp of the last replayed transaction
Next
From: Rob Wultsch
Date:
Subject: Re: How can we tell how far behind the standby is?