Re: text + text - Mailing list pgsql-general

From Stephan Szabo
Subject Re: text + text
Date
Msg-id 20041008062558.Q69318@megazone.bigpanda.com
Whole thread Raw
In response to Re: text + text  (David Garamond <lists@zara.6.isreserved.com>)
List pgsql-general
On Fri, 8 Oct 2004, David Garamond wrote:

> Peter Eisentraut wrote:
> >>What is "text + text" supposed to do right now?
> >
> > Nothing.
>
> Then are these bugs? (7.4.5 and 8.0.0beta1 give same results). Frankly,
> the current behaviour is quite strange to me.
>
> ------------------
> =# select coalesce('1'+'0','NULL');
>   a

That isn't text+text.  It's "char"+"char". "char" is a rather bizarre type
being partially 1 byte integer and partially 1 character string and it
causes strange behaviors like the above where I believe it's taking the
first bytes of the '1' and '0' and adding them together. I think Tom was
talking about removing the math operators from it so that things like the
above don't happen.


pgsql-general by date:

Previous
From: David Garamond
Date:
Subject: Re: when to use NULL and when to NOT NULL DEFAULT ''
Next
From: Michael Glaesemann
Date:
Subject: Re: when to use NULL and when to NOT NULL DEFAULT ''