Re: Looking for a doc section that presents the overload selection rules - Mailing list pgsql-general

From Bryn Llewellyn
Subject Re: Looking for a doc section that presents the overload selection rules
Date
Msg-id 35B730F5-27D8-4C2E-A6CE-5627E436533A@yugabyte.com
Whole thread Raw
In response to Re: Looking for a doc section that presents the overload selection rules  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
david.g.johnston@gmail.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.

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Looking for a doc section that presents the overload selection rules
Next
From: Bryn Llewellyn
Date:
Subject: Re: Looking for a doc section that presents the overload selection rules