Search Postgresql Archives

Re: [pgsql-advocacy] Oracle buys Innobase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alex Turner <armtuk@xxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux