From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "Robert Haas *EXTERN*" <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane *EXTERN* <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Antonin Houska <ah(at)cybertec(dot)at>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Functions used in index definitions shouldn't be changed |
Date: | 2014-11-21 08:53:06 |
Message-ID: | A737B7A37273E048B164557ADEF4A58B17DA379F@ntex2010a.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas wrote:
> On Thu, Nov 20, 2014 at 1:56 PM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
> > I don't think that there is a universally compelling right or wrong to
> > questions like this, it is more a matter of taste. Is it more important to protect
> > the casual DBA from hurting himself or herself, or is it more important to
> > provide a well honed scalpel for the experienced surgeon?
>
> +1.
>
> I think if we had an already-existing prohibition here and you
> proposed relaxing it, the howls would be equally loud. We're not
> entirely consistent about how picky we are.
There is also the possibility to add syntax like this:
CREATE OR REPLACE [FORCE] FUNCTION ...
What do you think about that? It would protect the casual user but allow
the expert to do it anyway.
Another thing I thought about is changing function volatility:
If you change the volatility of a function used in an index to anything
other than IMMUTABLE, your database will continue to work as expected, but
a dump will fail to restore with
ERROR: functions in index expression must be marked IMMUTABLE
Is that something worth checking for?
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Alex Shulgin | 2014-11-21 09:13:10 | Re: [PATCH] add ssl_protocols configuration option |
Previous Message | Dag-Erling Smørgrav | 2014-11-21 08:15:36 | Re: [PATCH] add ssl_protocols configuration option |