Tom Lane wrote:
Bruce Momjian <[EMAIL PROTECTED]> writes:
Peter Eisentraut wrote:
Aside from the apparent discrepancy between the documentation and the actual behavior, is there an actual use case where this is a problem?

No, I don't think so, and I am reluctant to adjust the documentation to
say "or similar".

The documentation is correct as it stands: max(text) returns text.
Adriaan's complaint about max(varchar) is off base because there is
no such function.

No, the documentation says that the Argument Type of max and min can be "any array, numeric, string, or date/time type" and that the Return type is the "same as argument type". The functions min and max applied to a field of type varchar return a function result of type text. So, if a max(varchar) function is missing and the cause of the text result type is implicit type casting, then the fact that there is no max(varchar) function is exactly the bug.

Adriaan van Os

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to