Thread: Space stripping ...

Space stripping ...

From
dlibenzi@maticad.it (Davide Libenzi)
Date:
Is there a way to avoid the trailing blanks from char fields ?

Why PostgreSQL store the full field on storage even if it's almost empty ?

Hi,

----
Davide Libenzi at :
Maticad s.r.l.
Via Della Giustizia n.9 Fano (PS) 61032 Italy
Tel.: +39-721-808308 (ra)  Fax: +39-721-808309
Email: <davidel@maticad.it>
WWW: <http://www.maticad.it>



Re: [GENERAL] Space stripping ...

From
Maarten Boekhold
Date:
On Fri, 24 Jul 1998, Davide Libenzi wrote:

> Is there a way to avoid the trailing blanks from char fields ?

TRIM() I think.

> Why PostgreSQL store the full field on storage even if it's almost empty ?

Cos that's how the char() type is supposed to work. You could ofcourse
use varchar(), which will only take the space it needs, in change for
some performance.

Maarten

_____________________________________________________________________________
| TU Delft, The Netherlands, Faculty of Information Technology and Systems  |
|                   Department of Electrical Engineering                    |
|           Computer Architecture and Digital Technique section             |
|                          M.Boekhold@et.tudelft.nl                         |
-----------------------------------------------------------------------------