Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, October 22, 2021, Bryn Llewellyn <bryn@xxxxxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux