Re: temporary functions (and other object types)
От | Robert Haas |
---|---|
Тема | Re: temporary functions (and other object types) |
Дата | |
Msg-id | AANLkTi=h6778spTZqfe-iF0ggXXA7UEaTLKZAEzT-iAO@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: temporary functions (and other object types) (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: temporary functions (and other object types)
|
Список | 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 по дате отправления: