Re: temporary functions (and other object types)
От | Tom Lane |
---|---|
Тема | Re: temporary functions (and other object types) |
Дата | |
Msg-id | 578.1288987327@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | temporary functions (and other object types) (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Ответы |
Re: temporary functions (and other object types)
|
Список | pgsql-hackers |
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. The general security risks around this make me hesitant to accept the idea of an explicit CREATE TEMP FUNCTION syntax: it's never going to be better than a second-class feature, so it shouldn't have a first-class syntax. regards, tom lane
В списке pgsql-hackers по дате отправления: