Default conversion of type numeric to text in 7.1.3

From: "Gurunandan R(dot) Bhat" <grbhat(at)exocore(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Default conversion of type numeric to text in 7.1.3
Date: 2001-11-21 18:39:37
Message-ID: Pine.LNX.4.33.0111220009180.4964-100000@suman.greenfields.universe
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message J Smith 2001-11-21 18:45:33 Re: PG vs MySQL
Previous Message Antonio Fiol Bonnín 2001-11-21 18:36:52 Re: first question