Re: [pgsql-advocacy] Oracle buys Innobase - Mailing list pgsql-general

From Tom Lane
Subject Re: [pgsql-advocacy] Oracle buys Innobase
Date
Msg-id 23805.1129913241@sss.pgh.pa.us
Whole thread Raw
In response to Re: [pgsql-advocacy] Oracle buys Innobase  (Alex Turner <armtuk@gmail.com>)
List pgsql-general
Alex Turner <armtuk@gmail.com> writes:
> It appears that casting to a char() causes spaces to be stripped (ignored)
> from the string:
mls=# select length('123 '::char(8));
length
--------
3
(1 row)

> I'm not sure about anyone else, but I would personaly consider that a bug?

No, it's a feature, as per extensive discussion some time ago when we
made it do that.  The general rule is that trailing spaces in a char(n)
are semantically insignificant.

            regards, tom lane

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: How to cluster Postgresql
Next
From: "Andrus"
Date:
Subject: Re: Select all invalid e-mail addresses