Re: char o varchar - Mailing list pgsql-general

From Andreas Fromm
Subject Re: char o varchar
Date
Msg-id 3F68093A.6040206@physik.uni-erlangen.de
Whole thread Raw
In response to char o varchar  ("Edwin Quijada" <listas_quijada@hotmail.com>)
Responses Re: char o varchar  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-general
As of my knowlege, varchar as the choice when you have varying lenght
strings, because only the real string lenght is stored in the db, while
char is usefull when most of your records ar exactly the stringlenght
defined by the column, because no overhead is to be kept for storing the
actual stringlenght.

Regards

Edwin Quijada wrote:

>
>
>
>
> Hoii!!
>
> I am creating my struct and I have the question :
> What I must use for character fields char or varchar?
> Which are the differences? and the better
> TIA
>
> *-------------------------------------------------------*
> *-Edwin Quijada
> *-Developer DataBase
> *-JQ Microsistemas
> *-809-747-2787
> * " Si deseas lograr cosas excepcionales debes de hacer cosas fuera de
> lo comun"
> *-------------------------------------------------------*
>
> _________________________________________________________________
> Charla con tus amigos en línea mediante MSN Messenger:
> http://messenger.yupimsn.com/
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend


--
Andreas Fromm

-----------------------------
Drink wet cement...
           ... and get stoned




pgsql-general by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: Idea for improving speed of pg_restore
Next
From: "Mark Cave-Ayland"
Date:
Subject: Re: State of Beta 2