Re: Functions used in index definitions shouldn't be changed

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: Robert Haas *EXTERN* <robertmhaas(at)gmail(dot)com>, 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 22:34:45
Message-ID: 546FBE05.7070602@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/21/14, 9:06 AM, Tom Lane wrote:
> Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> writes:
>> 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.
>
> I don't see any great attraction to that.

Given what this would do to someone's data, and our general stance on not hurting data, I'm a bit surprised that we don't want to do something here. Especially since we did go down this route with disallowing indexes on timestamptz casted to date, which seriously impacts a lot of reporting scenarios.

I fully agree that it's impractical to completely restrict this case, but something akin to FORCE seems reasonable. If nothing else, I'd think we should at least issue a warning if someone does something that might affect index viability.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kouhei Kaigai 2014-11-21 22:39:23 Re: [v9.5] Custom Plan API
Previous Message Jim Nasby 2014-11-21 22:23:37 Re: pg_multixact not getting truncated