Re: char o varchar

From: Andreas Fromm <Andreas(dot)Fromm(at)physik(dot)uni-erlangen(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: char o varchar
Date: 2003-09-17 07:11:54
Message-ID: 3F68093A.6040206@physik.uni-erlangen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ian Harding 2003-09-17 07:26:27 Re: pgSql Memory footprint
Previous Message Shridhar Daithankar 2003-09-17 06:08:47 Re: Idea for improving speed of pg_restore