Re: Looking for a doc section that presents the overload selection rules

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Looking for a doc section that presents the overload selection rules
Дата
Msg-id CAKFQuwbMJwt5gfKV+m+pTRFSAw66s8+Dpf-3hw6M-JN+p-HqXg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Looking for a doc section that presents the overload selection rules  (Bryn Llewellyn <bryn@yugabyte.com>)
Ответы Re: Looking for a doc section that presents the overload selection rules  (Bryn Llewellyn <bryn@yugabyte.com>)
Список pgsql-general
On Friday, October 22, 2021, Bryn Llewellyn <bryn@yugabyte.com> wrote:
There could, so easily, have been three “to_char()” overloads for these three data types that honored the spirit of the “::text” typecast by rendering only what’s meaningful, despite what the template asks for.

Even if we added to_char(date…) having it produce output “despite what the template asks for” is going to be questionable.  At least this way we are honest about what we are doing - if you don’t want non-date stuff in the output don’t have it in the template.  Unless the behavior is going to differ from what you can get today adding a new function doesn’t have a benefit.  It’s unclear whether having different behavior is desirable.

The argument about avoiding the implicit cast, and thus being easier for newcomers to figure out, is the compelling one for me.  But, frankly, “it just works” applies here - I’ve seen little evidence that there is a meaningful usability issue in the community.

David J.

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

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: Looking for a doc section that presents the overload selection rules
Следующее
От: Bryn Llewellyn
Дата:
Сообщение: Re: Looking for a doc section that presents the overload selection rules