On 12/11/2013 01:40 PM, Robert Haas wrote:
> On Tue, Dec 10, 2013 at 10:35 PM, Peter Eisentraut <pete...@gmx.net> wrote:
>> On Fri, 2013-12-06 at 11:28 +0100, Dimitri Fontaine wrote:
>>>> Here is an idea.  Add a GUC that basically says something like
>>>> use_transforms = on|off.  You can then attach that to individual
>>>> functions, which is the right granularity, because only the function
>>>> knows whether its code expects transforms or not.  But you can use
>>> the
>>>> full power of GUC to configure it any way you want.
>> Here is an updated patch that implements this, makes some of the
>> documentation improvements that you suggested, and rebases everything.
> I'm still kinda unimpressed by this.  Behavior-changing GUC, uggh.
It should work ok if we could somehow check that the GUC is set
on the function and fall back to session GUC in case it is not.

Not sure if this is possible though.

The need from this arises from calling other functions from a new func.
At the moment if there is a new function defined as

CREATE FUNCTION f_uses_xforms() AS $$ ... $$ SET use_transforms=on;

calls a legacy function which will break if transforms are used then the
_old_ function declaration needs to be modified to add (use_transforms=off)

It is much easier than debugging/rewriting the function, but this is
something I'd like us to be able to avoid.

PS. maybe we could resurrect the  WITH (attribute, ...) available in
CREATE FUNCTION syntax for passing function-specific flags ?


Hannu Krosing
PostgreSQL Consultant
Performance, Scalability and High Availability
2ndQuadrant Nordic OÜ

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to