Re: Significant spaces

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Significant spaces
Date: 2004-07-31 13:11:14
Message-ID: 5.2.1.1.0.20040731090830.00ac67f0@pop6.sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Joel Rodrigues 2004-08-01 08:42:16 Fwd: [NOVICE] contrib/xml make error on Mac OS X 10.3.4
Previous Message mike g 2004-07-31 04:12:40 Re: Significant spaces