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

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Functions used in index definitions shouldn't be changed
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17DA379F@ntex2010a.host.magwien.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>)
Список pgsql-hackers
Robert Haas wrote:
> On Thu, Nov 20, 2014 at 1:56 PM, Albe Laurenz <laurenz.albe@wien.gv.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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dag-Erling Smørgrav
Дата:
Сообщение: Re: [PATCH] add ssl_protocols configuration option
Следующее
От: Alex Shulgin
Дата:
Сообщение: Re: [PATCH] add ssl_protocols configuration option