Re: [pgsql-advocacy] Oracle buys Innobase

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alex Turner <armtuk(at)gmail(dot)com>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Doug Quale <quale1(at)charter(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: [pgsql-advocacy] Oracle buys Innobase
Date: 2005-10-21 16:47:21
Message-ID: 23805.1129913241@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Alex Turner <armtuk(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrus 2005-10-21 17:15:23 Re: Select all invalid e-mail addresses
Previous Message Joshua D. Drake 2005-10-21 16:37:04 Re: How to cluster Postgresql

Browse pgsql-sql by date

  From Date Subject
Next Message Jochen Kokemüller 2005-10-21 18:46:48 Reading bytea field
Previous Message Tom Lane 2005-10-21 16:06:31 Re: Delete rule chain stops unexpectedly