Re: [GENERAL] ERROR: functions in index expression must be marked IMMUTABLE

Поиск
Список
Период
Сортировка
От Geoff Winkless
Тема Re: [GENERAL] ERROR: functions in index expression must be marked IMMUTABLE
Дата
Msg-id CAEzk6fdkO_j2t_rY=VVHCP+Q0nyG-tfDuAPjF10=8ukRgxpB-A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] ERROR: functions in index expression must be markedIMMUTABLE  ("Sven R. Kunze" <srkunze@mail.de>)
Ответы Re: [GENERAL] ERROR: functions in index expression must be markedIMMUTABLE  ("Sven R. Kunze" <srkunze@mail.de>)
Список pgsql-general
On 1 March 2017 at 13:36, Sven R. Kunze <srkunze@mail.de> wrote:
On 28.02.2017 17:50, David G. Johnston wrote:
Supposedly one could provide a version of to_date that accepts a locale in which to interpret names in the input data - or extend the format string with some kind of "{locale=en_US}" syntax to avoid changing the function signature.
if this is acceptable, I would be willing to contribute a patch to enable exactly this.

​I don't see how that would help. You can't set a function to be immutable for "some" inputs (ie where locale is specified in the format string).

The only way to do it would be to add to_date(string, string, string) where the third string specifies the locale, at which point I don't really see why you would gain anything over creating your own UDF.

Geoff​

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

Предыдущее
От: "Sven R. Kunze"
Дата:
Сообщение: Re: [GENERAL] ERROR: functions in index expression must be markedIMMUTABLE
Следующее
От: "Sven R. Kunze"
Дата:
Сообщение: Re: [GENERAL] ERROR: functions in index expression must be markedIMMUTABLE