From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: temporary functions (and other object types) |
Date: | 2010-11-06 01:01:50 |
Message-ID: | AANLkTi=h6778spTZqfe-iF0ggXXA7UEaTLKZAEzT-iAO@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Nov 5, 2010 at 4:02 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Rob Wultsch | 2010-11-06 03:28:24 | Re: How can we tell how far behind the standby is? |
Previous Message | Robert Haas | 2010-11-06 00:58:31 | Re: timestamp of the last replayed transaction |