On Thursday, October 21, 2021, Bryn Llewellyn <b...@yugabyte.com> wrote:
> > This causes the 42883 error, "function f(date) does not exist". I might've > expected the system to have done an implicit conversion to "text" because > this conversion is supported, thus: > Yes, implicit casting to text is bad. > > For some reason, the implicit conversion from "date" to "timestamptz" _is_ > considered to be preferable to the implicit conversion from "date" to plain > "timestamp". > > Where, in the PG doc, can I find a statement of the rules that allow me to > predict the outcome of my tests? > I do not believe the relevant metadata is maintained in the documentation. You would have to, at minimum, consult the system catalogs; as documented here: https://www.postgresql.org/docs/current/typeconv-overview.html Note that page does discuss the concept of “preference” that you’ve observed. David J.