From: | Bryn Llewellyn <bryn(at)yugabyte(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>, Tom Lane PostgreSQL <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Looking for a doc section that presents the overload selection rules |
Date: | 2021-10-22 18:39:50 |
Message-ID: | 35B730F5-27D8-4C2E-A6CE-5627E436533A@yugabyte.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> david(dot)g(dot)johnston(at)gmail(dot)com wrote:
>
>> Bryn wrote:
>>
>> There could, so easily, have been three “to_char()” overloads for these three data types…
>
> 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.
Thanks, David. Yes, I agree. This will be my advice:
Use a “date” actual for “to_char()”, with no explicit typecast, and with a template that makes sense. In this special case it’s safe to relax the usual rule of practice and just let the implicit typecast have its innocent effect.
From | Date | Subject | |
---|---|---|---|
Next Message | Bryn Llewellyn | 2021-10-22 18:41:17 | Re: Looking for a doc section that presents the overload selection rules |
Previous Message | David G. Johnston | 2021-10-22 18:16:42 | Re: Looking for a doc section that presents the overload selection rules |