Re: Trailing spaces in char or varchar fields - Mailing list pgsql-novice

From Tom Lane
Subject Re: Trailing spaces in char or varchar fields
Date
Msg-id 26769.978661327@sss.pgh.pa.us
Whole thread Raw
In response to RE: Trailing spaces in char or varchar fields  ("Huy Do" <huy@travel.com.au>)
List pgsql-novice
"Huy Do" <huy@travel.com.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

pgsql-novice by date:

Previous
From: "Huy Do"
Date:
Subject: RE: Trailing spaces in char or varchar fields
Next
From: "Eric Nielsen"
Date:
Subject: I think I know what I'm doing wrong, but....