Functions used in index definitions shouldn't be changed

Поиск
Список
Период
Сортировка
Искать
От
Albe Laurenz
Тема
Functions used in index definitions shouldn't be changed
Дата
Msg-id
A737B7A37273E048B164557ADEF4A58B17D9FF61@ntex2010a.host.magwien.gv.at
Список
Дерево обсуждения
Functions used in index definitions shouldn't be changed Albe Laurenz <laurenz.albe@wien.gv.at>
Re: Functions used in index definitions shouldn't be changed Antonin Houska <ah@cybertec.at>
Re: Functions used in index definitions shouldn't be changed Tom Lane <tgl@sss.pgh.pa.us>
Re: Functions used in index definitions shouldn't be changed Albe Laurenz <laurenz.albe@wien.gv.at>
Re: Functions used in index definitions shouldn't be changed Robert Haas <robertmhaas@gmail.com>
Re: Functions used in index definitions shouldn't be changed Tom Lane <tgl@sss.pgh.pa.us>
Re: Functions used in index definitions shouldn't be changed Andrew Dunstan <andrew@dunslane.net>
Re: Functions used in index definitions shouldn't be changed Albe Laurenz <laurenz.albe@wien.gv.at>
Re: Functions used in index definitions shouldn't be changed Tom Lane <tgl@sss.pgh.pa.us>
Re: Functions used in index definitions shouldn't be changed Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Functions used in index definitions shouldn't be changed Marko Tiikkaja <marko@joh.to>
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.

Yours,
Laurenz Albe
В списке pgsql-hackers по дате отправления
От: Heikki Linnakangas
Дата:
От: Andres Freund
Дата:
FAQ