Re: Intended behaviour of SET search_path with SQL functions?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Intended behaviour of SET search_path with SQL functions?
Дата
Msg-id 19078.1204826972@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Intended behaviour of SET search_path with SQL functions?  (Richard Huxton <dev@archonet.com>)
Список pgsql-hackers
Richard Huxton <dev@archonet.com> writes:
> => CREATE OR REPLACE FUNCTION func_b() RETURNS SETOF int AS $$
>          SELECT id FROM table_a;
> $$ LANGUAGE sql SET search_path = alpha;
> ERROR:  relation "table_a" does not exist

Hmmm, I'll bet the validator forgets to apply the parameter modification.

In plpgsql we had to dumb down the validator to do only a bare
syntax check and not any semantic validation.  Perhaps SQL function
validation should act the same?  You can certainly think of plenty
of other reasons why a full semantics check might fail at function
definition time.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.3.0 Core with concurrent vacuum fulls
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Behaviour of to_tsquery(stopwords only)