From: | Antonin Houska <ah(at)cybertec(dot)at> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Functions used in index definitions shouldn't be changed |
Date: | 2014-11-19 15:21:29 |
Message-ID: | 20449.1416410489@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
> Currently it is possible to change the behaviour of a function with
> CREATE OR REPLACE FUNCTION even if the function is part of an index definition.
>
> I think that should be forbidden, because it is very likely to corrupt
> the index. I expect the objection that this would break valid use cases
> where people know exactly what they are doing, but I believe that this
> is a footgun for inexperienced users that should be disarmed.
>
> I'd also opt for forbidding behaviour changing modifications with ALTER FUNCTION
> for functions used in index definitions, specifically altering strictness.
>
> Attached is a patch implementing a fix.
Instead of adding extra check, shouldn't you just ensure that
DEPENDENCY_INTERNAL is the dependency type and let the existing logic do the work?
--
Antonin Houska
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de, http://www.cybertec.at
From | Date | Subject | |
---|---|---|---|
Next Message | Petr Jelinek | 2014-11-19 15:25:27 | Re: Add shutdown_at_recovery_target option to recovery.conf |
Previous Message | Andres Freund | 2014-11-19 15:01:17 | Re: Increasing test coverage of WAL redo functions |