From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Thom Brown <thombrown(at)gmail(dot)com>, Jean-Baptiste Quenot <jbq(at)caraldi(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_dump does not honor namespaces when functions are used in index |
Date: | 2010-06-17 15:08:20 |
Message-ID: | 3959.1276787300@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-06-17 15:25:06 | Re: Should the JSON datatype be a specialization of text? |
Previous Message | Marc G. Fournier | 2010-06-17 14:47:41 | Re: ANNOUNCE list (was Re: New PGXN Extension site) |