Re: Documentation fix for CREATE FUNCTION

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Documentation fix for CREATE FUNCTION
Дата
Msg-id 14484.1468421827@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Documentation fix for CREATE FUNCTION  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Ответы Re: Documentation fix for CREATE FUNCTION  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-hackers
Albe Laurenz <laurenz.albe@wien.gv.at> writes:
> I just noticed that the documentation for CREATE FUNCTION still mentions
> that the temporary namespace is searched for functions even though that
> has been removed with commit aa27977.

The example you propose to correct was introduced by that same commit,
which should make you think twice about whether it really was invalidated
by that commit.

I believe the reason for forcing pg_temp to the back of the path is to
prevent unqualified table names from being captured by pg_temp entries.
This risk exists despite the rule against searching pg_temp for functions
or operators.  A maliciously named temp table could at least prevent
a security definer function from doing what it was supposed to, and
could probably hijack control entirely via triggers or rules.

Possibly the documentation should be more explicit about why this is
being done, but the example code is good as-is.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: rethinking dense_alloc (HashJoin) as a memory context
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <