Default conversion of type numeric to text in 7.1.3 - Mailing list pgsql-general

From Gurunandan R. Bhat
Subject Default conversion of type numeric to text in 7.1.3
Date
Msg-id Pine.LNX.4.33.0111220009180.4964-100000@suman.greenfields.universe
Whole thread Raw
Responses Re: Default conversion of type numeric to text in 7.1.3
List pgsql-general
Hi,

    The excellently detailed Postgres manual, seems to indicate that
the concatenation operator "||"  converts the right and left operands of
all base types to text with the exception of boolean which cannot be cast
as any other type. However I find that the conversion of numeric to text
fails with an error mesage indicating that || cannot concatenate text with
numeric.  To make the concatenation work, I am forced to explicity cast
numeric with a text(numeric).

    Is this correct behaviour consistent with the manual? Also, what
special problems prevent the conversion of boolean to text? We could fix
things so that text(boolean)  return the strings TRUE or FALSE depending
on the argument.

Many thanks in advance

Regards,
Gurunandan




pgsql-general by date:

Previous
From: Antonio Fiol Bonnín
Date:
Subject: Re: first question
Next
From: merlyn@stonehenge.com (Randal L. Schwartz)
Date:
Subject: Re: Slightly OT: outer joins