Re: pg_dump does not honor namespaces when functions are used in index
| От | Tom Lane |
|---|---|
| Тема | Re: pg_dump does not honor namespaces when functions are used in index |
| Дата | |
| Msg-id | 3959.1276787300@sss.pgh.pa.us обсуждение |
| Ответ на | Re: pg_dump does not honor namespaces when functions are used in index (Robert Haas <robertmhaas@gmail.com>) |
| Ответы |
Re: pg_dump does not honor namespaces when functions are used in
index
|
| Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> writes:
> I suppose that the root of the problem here is that foo() is not
> really immutable - it gives different results depending on the search
> path.
Yeah. The declaration of the function is broken --- it's not pg_dump's
fault that the function misbehaves.
> I actually wonder if we shouldn't automatically tag plpgsql functions
> with the search_path in effect at the time of their creation (as if
> the user had done ALTER FUNCTION ... SET search_path=...whatever the
> current search path is...).
That would be extremely expensive and not very backwards-compatible.
In the case at hand, just writing "RETURN bar.bar();" would be the
best-performing solution.
regards, tom lane
В списке pgsql-hackers по дате отправления: