Re: Significant spaces - Mailing list pgsql-novice

From Frank Bax
Subject Re: Significant spaces
Date
Msg-id 5.2.1.1.0.20040731090830.00ac67f0@pop6.sympatico.ca
Whole thread Raw
In response to Re: Significant spaces  (mike g <mike@thegodshalls.com>)
List pgsql-novice
At 12:12 AM 7/31/04, mike g wrote:
>Varchar will automatically trim any unused positions.


varchar doesn't 'trim' anything - it inserts text exactly as it is coded.


fbax=# create table vctest( c1 varchar );
CREATE
fbax=# insert into vctest values('abc   ');
INSERT 11939819 1
fbax=# insert into vctest values('abcd');
INSERT 11939820 1
fbax=# select *,length(c1) from vctest where c1~' $';
    c1   | length
--------+--------
  abc    |      6
(1 row)



pgsql-novice by date:

Previous
From: mike g
Date:
Subject: Re: Significant spaces
Next
From: Joel Rodrigues
Date:
Subject: Fwd: contrib/xml make error on Mac OS X 10.3.4