Re: trailing spaces

From: Diana Cionoiu <diana(at)softwaresolutions(dot)ro>
To: Alejandro Fernandez <ale(at)nin(dot)cx>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: trailing spaces
Date: 2001-05-15 06:57:39
Message-ID: Pine.LNX.4.30.0105150956540.13406-100000@tudor.softwaresolutions.ro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>Hi,

Hy,

>I have a table with a field created as char(400). For some reason, when
>I insert information into this, trailing spaces are automatically added
>so that select char_length(fieldname) always gives 400.
>
>How can I amend this table column so that I don't have to use "select
>trim(trailing from fieldname);" to get a well formatted result?

Don't use char(400) use varchar(400).

>Thanks
>
>Ale

Diana

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Seidel 2001-05-15 07:05:45 Re: [HACKERS] Internet is putting lot of competition fire & heat under Microsoft SQL Server
Previous Message will trillich 2001-05-15 06:46:32 if exists, select; if not, create then select... ??