Re: BUG #2905: min and max return incorrect text type

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org, Adriaan van Os <postgres(at)microbizz(dot)nl>
Subject: Re: BUG #2905: min and max return incorrect text type
Date: 2007-01-21 14:43:53
Message-ID: 200701211443.l0LEhrv24550@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Peter Eisentraut wrote:
> Adriaan van Os wrote:
> > >> However, min(VARCHAROID) and max(VARCHAROID) return TEXTOID as a
> > >> result type.
> > >
> > > Yea, they are internally treated as very similar types.
> >
> > But "internally treated as very similar" is still not "same as
> > argument type". Computing requires exactness.
>
> 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".

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2007-01-21 17:23:45 Re: Troubles in Initializing Postgres Database 8.2
Previous Message Adriaan van Os 2007-01-21 13:42:37 Re: BUG #2905: min and max return incorrect text type