Re: pg_dump does not honor namespaces when functions are used in index
От
Greg Stark
Тема
Re: pg_dump does not honor namespaces when functions are used in
index
Дата
Msg-id
AANLkTimUXm9vrI4Ebi6M-ndeJZlle1VXJKUFdQmqTgaW@mail.gmail.com
Ответ на
Список
Дерево обсуждения
pg_dump does not honor namespaces when functions are used in index Jean-Baptiste Quenot <jbq@caraldi.com>
Re: pg_dump does not honor namespaces when functions are
used in index Thom Brown <thombrown@gmail.com>
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 Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_dump does not honor namespaces when functions are used in
index Greg Stark <gsstark@mit.edu>
Re: pg_dump does not honor namespaces when functions are used in
index Jean-Baptiste Quenot <jbq@caraldi.com>
Re: pg_dump does not honor namespaces when functions are used in
index Thom Brown <thombrown@gmail.com>
Re: pg_dump does not honor namespaces when functions are
used in index Thom Brown <thombrown@gmail.com>
On Thu, Jun 17, 2010 at 4:08 PM, Tom Lane wrote: >> 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. > I wonder if we should have a mode for plpgsql functions where all name lookups are done at definition time So the bar() function would be resolved to bar.bar() and stored that way permanently so that pg_dump dumped the definition as bar.bar(). That would be probably just as good as setting the search path on the function for most users and better for some. It would have the same problem with dynamic sql that a lot of things have though. -- greg
В списке pgsql-hackers по дате отправления
От: Joshua D. Drake
Дата: