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-11-26 22:16:27
Message-ID: 52951DBB.9040908@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/20/2013 10:58 PM, Robert Haas wrote:
> On Wed, Nov 20, 2013 at 11:51 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>> This is a transition problem. Nobody is required to install the
>> transforms into their existing databases. They probably shouldn't.
> Sure, but that's like saying "nobody's required to use this
> behavior-changing GUC, so it's OK to have a behavior-changing GUC".
>
> The point I think Dimitri is making, which IMHO is entirely valid, is
> that the feature as currently designed is database-wide. You either
> get this behavior for all of your functions, or you get it for none of
> them, and that might well not be what you want. For example, it's
> easy to imagine that you might want to install extensions A and B. A
> expects that a certain transform is loaded into the database, and B
> expects that it isn't. You now have created a situation where
> extensions A and B can't be used together. That sucks.
>
> If the transform were a property of particular function argument
> positions, this wouldn't be a problem. You could declare, in effect,
> that a certain function takes a transformed hstore, and this other one
> takes a non-transformed hstore. Now life is good. But that's not
> what is being proposed.
You mean something like

CREATE FUNCTION f(i int, h1 hstore USING TRANSFORM x, h2 hstore) ...

where h1 would go through transform x and 1 and h2
would use "default transform" ?

Cheers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-11-26 22:19:49 Re: doPickSplit stack buffer overflow in XLogInsert?
Previous Message Kevin Grittner 2013-11-26 22:14:38 doPickSplit stack buffer overflow in XLogInsert?