Re: Trailing spaces in char or varchar fields

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Huy Do" <huy(at)travel(dot)com(dot)au>
Cc: "PostgreSQL-Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Trailing spaces in char or varchar fields
Date: 2001-01-05 02:22:07
Message-ID: 26769.978661327@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Huy Do" <huy(at)travel(dot)com(dot)au> writes:
> is there any major disadvantages of changing all my char fields to
> varchar fields

No. Stop worrying about micro-optimization and instead worry about
picking the data type that describes the semantics of your data.
If the presence or absence of a trailing space makes a difference
to you, then you should be using varchar (or text).

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Eric Nielsen 2001-01-05 04:13:58 I think I know what I'm doing wrong, but....
Previous Message Huy Do 2001-01-05 02:15:41 RE: Trailing spaces in char or varchar fields