Re: [HACKERS] adding an immutable variant of to_date

Поиск
Список
Период
Сортировка
От Sven R. Kunze
Тема Re: [HACKERS] adding an immutable variant of to_date
Дата
Msg-id bd9db219-675e-0822-0f9b-414cbf110d5f@mail.de
обсуждение исходный текст
Ответ на Re: [HACKERS] adding an immutable variant of to_date  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 08.03.2017 03:37, Robert Haas wrote:
> The commit message for 64353640e87b54250f1b8a1d2a708d270dff4bfd has
> some interesting perspective on this.

"""
Also, mark to_date() and to_char(interval) as stable; although these appear
not to depend on any GUC variables as of CVS HEAD, that seems a property
unlikely to survive future improvements.  It seems best to mark all the
formatting functions stable and be done with it.
"""

My take away from this commit is the following:

Historically, the immutability of "to_date(text, text)" was an emergent 
feature. Proven to be possibly mutable, the parsing feature had a higher 
priority, so the immutability needed to be removed.

The proposed variant on the other hand should be immutable first before 
everything else. Thus, future improvements cannot violate that. This 
might restrict the possible parsing functionality but that shouldn't be 
a problem in practice.

Regards,
Sven



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

Предыдущее
От: "Sven R. Kunze"
Дата:
Сообщение: Re: [HACKERS] adding an immutable variant of to_date
Следующее
От: Tom Lane
Дата:
Сообщение: [HACKERS] Upgrading postmaster's log messages about bind/listen errors