Re: Should there be a charcat?

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Should there be a charcat?
Date: 2006-10-08 17:12:28
Message-ID: 20061008171228.GJ72517@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 06, 2006 at 04:10:42PM -0400, Tom Lane wrote:
> "Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> > I would think that c || 'x' would result in 'x x',
> > but it doesn't
>
> We did it that way up through 7.3, but changed because we concluded the
> behavior was inconsistent. The behavior of char(N) these days is that
> the padding spaces are not semantically significant, which means that
> they effectively are not there for anything except display purposes.

Nah, I've just always thought of the spaces as being significant. Then
again, I tend to avoid char, so...

> If we didn't do this, we would have situations where, for example,
> A = B but (A || 'x') != (B || 'x'). Does that strike you as a good idea?
>
> If you're interested you can probably find more discussion in the
> archives from mid-2003 or so.
>
> regards, tom lane
>

--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-10-08 17:19:09 Re: Checking max_stack_depth automatically
Previous Message Jim C. Nasby 2006-10-08 17:03:26 Re: timestamptz alias