Re: [PATCH] Add transforms feature

From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Add transforms feature
Date: 2013-12-11 14:19:45
Message-ID: 52A87481.1030409@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/11/2013 01:40 PM, Robert Haas wrote:
> On Tue, Dec 10, 2013 at 10:35 PM, Peter Eisentraut <peter_e(at)gmx(dot)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 ?

Cheers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-12-11 14:22:07 Re: Question about sorting internals
Previous Message Robert Haas 2013-12-11 13:56:43 Re: -d option for pg_isready is broken