Re: trailing spaces - Mailing list pgsql-general

From Diana Cionoiu
Subject Re: trailing spaces
Date
Msg-id Pine.LNX.4.30.0105150956540.13406-100000@tudor.softwaresolutions.ro
Whole thread Raw
In response to trailing spaces  (Alejandro Fernandez <ale@nin.cx>)
List 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


pgsql-general by date:

Previous
From: Justin Clift
Date:
Subject: Re: trailing spaces
Next
From: snpe
Date:
Subject: Performance aggregates